zig/doc/langref/test_unreachable.zig

12 lines
208 B
Zig

// unreachable is used to assert that control flow will never reach a
// particular location:
test "basic math" {
const x = 1;
const y = 2;
if (x + y != 3) {
unreachable;
}
}
// test