… | |
… | |
61 | // is mostly true or mosty false. note that these return |
61 | // is mostly true or mosty false. note that these return |
62 | // booleans, not the expression. |
62 | // booleans, not the expression. |
63 | #define expect_false(expr) expect ((expr) ? 1 : 0, 0) |
63 | #define expect_false(expr) expect ((expr) ? 1 : 0, 0) |
64 | #define expect_true(expr) expect ((expr) ? 1 : 0, 1) |
64 | #define expect_true(expr) expect ((expr) ? 1 : 0, 1) |
65 | |
65 | |
66 | // try to tell the compiler tat some condition is definitely true |
66 | // try to tell the compiler that some condition is definitely true |
67 | #define assume(cond) do { if (!(cond)) unreachable (); } while (0) |
67 | #define assume(cond) do { if (!(cond)) unreachable (); } while (0) |
68 | |
68 | |
69 | #endif |
69 | #endif |
70 | |
70 | |