3 type: char, short, long
9 #include <float.h> /* bug #2314 was a conflict between iso646.h and float.h */
13 testTwoOpBitwise(void)
15 #if !defined(__SDCC_pdk14) // Lack of memory
16 {storage
} {attr
} {type
} left
, right
;
18 left
= ({type
})0x3df7;
19 right
= ({type
})0xc1ec;
21 ASSERT(({type
})(left
bitand right
) == ({type
})0x1E4);
22 ASSERT(({type
})(right
bitand left
) == ({type
})0x1E4);
23 ASSERT(({type
})(left
bitand 0xc1ec) == ({type
})0x1E4);
24 ASSERT(({type
})(0x3df7 bitand right
) == ({type
})0x1E4);
26 ASSERT(({type
})(left
bitor right
) == ({type
})0xFDFF);
27 ASSERT(({type
})(right
bitor left
) == ({type
})0xFDFF);
28 ASSERT(({type
})(left
bitor 0xc1ec) == ({type
})0xFDFF);
29 ASSERT(({type
})(0x3df7 bitor right
) == ({type
})0xFDFF);
31 ASSERT(({type
})(left
xor right
) == ({type
})0xFC1B);
32 ASSERT(({type
})(right
xor left
) == ({type
})0xFC1B);
33 ASSERT(({type
})(left
xor 0xc1ec) == ({type
})0xFC1B);
34 ASSERT(({type
})(0x3df7 xor right
) == ({type
})0xFC1B);
53 {type
} true = alwaysTrue();
54 {type
} false = alwaysFalse();
58 ASSERT(not not not false);
59 ASSERT(true not_eq false);
66 ASSERT(compl 0xaa55 == ~0xaa55);
67 ASSERT(bitand i
== &i
);