authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-16 17:15:42-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-01-16 17:15:42-05:00
logcf3b9f4f5b82dae4cefc793da0674438fbd60384
treec6d6fc65194fe878c11e7a87110fb317e80d5bda
parent0caee421e38672869dd596e6af732567cfaf2037

add test for compile time bool not operator

closes #205

1 files changed, 11 insertions(+), 0 deletions(-)

test/cases/bool.zig+11
......@@ -44,3 +44,14 @@ fn shortCircuitAndOr() {
4444 a ||= true;
4545 assert(a);
4646}
47
48const global_f = false;
49const global_t = true;
50const not_global_f = !global_f;
51const not_global_t = !global_t;
52fn compileTimeBoolnot() {
53 @setFnTest(this);
54
55 assert(not_global_f);
56 assert(!not_global_t);
57}