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() */
59 /* Alternate that is similar. */
62 /* Tested using neverGetHere() */
66 /* Test that the evaluation is done left to right. */
67 if (alwaysGetHere() && true && false) {
75 {type} true = alwaysTrue();
76 {type} false = alwaysFalse();
78 ASSERT(false || false || true);
79 ASSERT(!true || !false);
80 ASSERT(false || true);
82 /* Test that the evaluation is aborted on the first hit. */
83 if (false || true || neverGetHere()) {
84 /* Tested using neverGetHere() */
88 /* Test that the evaluation is done left to right. */
89 if (alwaysGetHere() || true || false) {
97 {type} true = alwaysTrue();
98 {type} false = alwaysFalse();
106 testFlagToVariable(void)
108 {type} true = alwaysTrue();
109 {type} false = alwaysFalse();