| 1 | // This is how std.debug.assert is implemented |
| 2 | fn assert(ok: bool) void { |
| 3 | if (!ok) unreachable; // assertion failure |
| 4 | } |
| 5 | |
| 6 | // This test will fail because we hit unreachable. |
| 7 | test "this will fail" { |
| 8 | assert(false); |
| 9 | } |
| 10 | |
| 11 | // test_error= |