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 /* Test that the evaluation is aborted on the first false. */
55 if (true && false && neverGetHere()) {
56 /* Tested using neverGetHere() */
60 /* Test that the evaluation is done left to right. */
61 if (alwaysGetHere() && true && false) {
69 {type} true = alwaysTrue();
70 {type} false = alwaysFalse();
72 ASSERT(false || false || true);
73 ASSERT(!true || !false);
74 ASSERT(false || true);
76 /* Test that the evaluation is aborted on the first hit. */
77 if (false || true || neverGetHere()) {
78 /* Tested using neverGetHere() */
82 /* Test that the evaluation is done left to right. */
83 if (alwaysGetHere() || true || false) {
91 {type} true = alwaysTrue();
92 {type} false = alwaysFalse();
100 testFlagToVariable(void)
102 {type} true = alwaysTrue();
103 {type} false = alwaysFalse();