aboutsummaryrefslogtreecommitdiff
path: root/test/incremental/assert_function.0.zig
blob: 889c9b15723392dc284e886b58bcaa72c1e06309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub fn main() void {
    add(3, 4);
}

fn add(a: u32, b: u32) void {
    assert(a + b == 7);
}

pub fn assert(ok: bool) void {
    if (!ok) unreachable; // assertion failure
}

// run
// target=x86_64-linux,x86_64-macos
//