1 /** Tests the basic logical operations.
13 return ({type}){values};
25 FAILM("Shouldn't get here");
47 {type} true = alwaysTrue();
48 {type} false = alwaysFalse();
50 ASSERT(true && true && true);
51 ASSERT(true && !false);
52 ASSERT(!false && true);
55 /* PENDING: Doesn't work. */
56 /* Test that the evaluation is aborted on the first false. */
57 if (true && false && neverGetHere()) {
58 /* Tested using neverGetHere() */
61 /* Alternate that is similar. */
64 /* Tested using neverGetHere() */
69 /* Test that the evaluation is done left to right. */
70 if (alwaysGetHere() && true && false) {
78 {type} true = alwaysTrue();
79 {type} false = alwaysFalse();
81 ASSERT(false || false || true);
82 ASSERT(!true || !false);
83 ASSERT(false || true);
86 /* PENDING: Doesn't work in sdcc. */
87 /* Test that the evaluation is aborted on the first hit. */
88 if (false || true || neverGetHere()) {
89 /* Tested using neverGetHere() */
96 /* Test that the evaluation is done left to right. */
97 if (alwaysGetHere() || true || false) {
105 {type} true = alwaysTrue();
106 {type} false = alwaysFalse();
114 testFlagToVariable(void)
116 {type} true = alwaysTrue();
117 {type} false = alwaysFalse();