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);
54 /* PENDING: Doesn't work. */
55 /* Test that the evaluation is aborted on the first false. */
56 if (true && false && neverGetHere()) {
57 /* Tested using neverGetHere() */
60 /* Alternate that is similar. */
63 /* Tested using neverGetHere() */
67 /* Test that the evaluation is done left to right. */
68 if (alwaysGetHere() && true && false) {
76 {type} true = alwaysTrue();
77 {type} false = alwaysFalse();
79 ASSERT(false || false || true);
80 ASSERT(!true || !false);
81 ASSERT(false || true);
83 /* PENDING: Doesn't work in sdcc. */
84 /* Test that the evaluation is aborted on the first hit. */
85 if (false || true || neverGetHere()) {
86 /* Tested using neverGetHere() */
90 /* Test that the evaluation is done left to right. */
91 if (alwaysGetHere() || true || false) {
99 {type} true = alwaysTrue();
100 {type} false = alwaysFalse();
108 testFlagToVariable(void)
110 {type} true = alwaysTrue();
111 {type} false = alwaysFalse();