From cf3b9f4f5b82dae4cefc793da0674438fbd60384 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 16 Jan 2017 17:15:42 -0500 Subject: [PATCH] add test for compile time bool not operator closes #205 --- test/cases/bool.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/cases/bool.zig b/test/cases/bool.zig index b449c0a816..fce22d86ae 100644 --- a/test/cases/bool.zig +++ b/test/cases/bool.zig @@ -44,3 +44,14 @@ fn shortCircuitAndOr() { a ||= true; assert(a); } + +const global_f = false; +const global_t = true; +const not_global_f = !global_f; +const not_global_t = !global_t; +fn compileTimeBoolnot() { + @setFnTest(this); + + assert(not_global_f); + assert(!not_global_t); +}