aboutsummaryrefslogtreecommitdiff
path: root/test/cases/assert_function.8.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/cases/assert_function.8.zig')
-rw-r--r--test/cases/assert_function.8.zig20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/cases/assert_function.8.zig b/test/cases/assert_function.8.zig
deleted file mode 100644
index 02b486a8cb..0000000000
--- a/test/cases/assert_function.8.zig
+++ /dev/null
@@ -1,20 +0,0 @@
-extern "c" fn write(c_int, usize, usize) usize;
-
-pub fn main() void {
- var i: u32 = 0;
- inline while (i < 4) : (i += 1) print();
- assert(i == 4);
-}
-
-fn print() void {
- _ = write(1, @intFromPtr("hello\n"), 6);
-}
-
-pub fn assert(ok: bool) void {
- if (!ok) unreachable; // assertion failure
-}
-
-// error
-//
-// :5:21: error: unable to resolve comptime value
-// :5:21: note: condition in comptime branch must be comptime-known