mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
move behavior test to "passing for stage2" section
This commit is contained in:
parent
dc214e041e
commit
ab84ba39d0
@ -1,7 +1,6 @@
|
||||
const builtin = @import("builtin");
|
||||
|
||||
test {
|
||||
// Tests that pass for both.
|
||||
_ = @import("behavior/bool.zig");
|
||||
_ = @import("behavior/basic.zig");
|
||||
_ = @import("behavior/generics.zig");
|
||||
@ -13,8 +12,10 @@ test {
|
||||
_ = @import("behavior/usingnamespace.zig");
|
||||
_ = @import("behavior/atomics.zig");
|
||||
|
||||
if (!builtin.zig_is_stage2) {
|
||||
// Tests that only pass for stage1.
|
||||
if (builtin.zig_is_stage2) {
|
||||
// When all comptime_memory.zig tests pass, #9646 can be closed.
|
||||
// _ = @import("behavior/comptime_memory.zig");
|
||||
} else {
|
||||
_ = @import("behavior/align.zig");
|
||||
_ = @import("behavior/alignof.zig");
|
||||
_ = @import("behavior/array_stage1.zig");
|
||||
@ -91,8 +92,6 @@ test {
|
||||
_ = @import("behavior/byval_arg_var.zig");
|
||||
_ = @import("behavior/call.zig");
|
||||
_ = @import("behavior/cast_stage1.zig");
|
||||
// When these tests pass, #9646 can be closed.
|
||||
// _ = @import("behavior/comptime_memory.zig");
|
||||
_ = @import("behavior/const_slice_child.zig");
|
||||
_ = @import("behavior/defer.zig");
|
||||
_ = @import("behavior/enum.zig");
|
||||
|
||||
@ -73,3 +73,11 @@ test "cmpxchg with ptr" {
|
||||
try expect(@cmpxchgStrong(*i32, &x, &data3, &data2, .SeqCst, .SeqCst) == null);
|
||||
try expect(x == &data2);
|
||||
}
|
||||
|
||||
test "cmpxchg with ignored result" {
|
||||
var x: i32 = 1234;
|
||||
|
||||
_ = @cmpxchgStrong(i32, &x, 1234, 5678, .Monotonic, .Monotonic);
|
||||
|
||||
try expect(5678 == x);
|
||||
}
|
||||
|
||||
@ -28,14 +28,6 @@ fn test_u128_cmpxchg() !void {
|
||||
try expect(x == 42);
|
||||
}
|
||||
|
||||
test "cmpxchg with ignored result" {
|
||||
var x: i32 = 1234;
|
||||
|
||||
_ = @cmpxchgStrong(i32, &x, 1234, 5678, .Monotonic, .Monotonic);
|
||||
|
||||
try expectEqual(@as(i32, 5678), x);
|
||||
}
|
||||
|
||||
var a_global_variable = @as(u32, 1234);
|
||||
|
||||
test "cmpxchg on a global variable" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user