aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_call_builtin.zig
blob: 8caecf73c4843ab64f381326aac564d243f91f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
const expect = @import("std").testing.expect;

test "noinline function call" {
    try expect(@call(.auto, add, .{ 3, 9 }) == 12);
}

fn add(a: i32, b: i32) i32 {
    return a + b;
}

// test