aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/duplicated_test_names.zig
blob: e7ee93776cb23e8731255818a1a38f485c243860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const builtin = @import("builtin");

const Namespace = struct {
    test "thingy" {}
};

fn thingy(a: usize, b: usize) usize {
    return a + b;
}

comptime {
    _ = Namespace;
}

test "thingy" {}

test thingy {
    if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
    if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;

    if (thingy(1, 2) != 3) unreachable;
}