diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2024-11-11 20:00:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-11 20:00:00 +0000 |
| commit | 28bdab385a80aaff736707a9227af2d1a17e7fa4 (patch) | |
| tree | 66e6d8479ad4152b9fee6f958f1061f86c180584 /test/cases/assert_function.8.zig | |
| parent | 560d6b99d5be8e906b7d8d70a2b2e1f1d4da4f89 (diff) | |
| parent | 6e56bc1096eb99a065bc7222bf3264142251da6d (diff) | |
| download | zig-28bdab385a80aaff736707a9227af2d1a17e7fa4.tar.gz zig-28bdab385a80aaff736707a9227af2d1a17e7fa4.zip | |
Merge pull request #21961 from mlugg/incr-cases
incremental: remove legacy cases, add some new ones
Diffstat (limited to 'test/cases/assert_function.8.zig')
| -rw-r--r-- | test/cases/assert_function.8.zig | 20 |
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 |
