Skip to content

Commit 9f0fd72

Browse files
committed
categorize nan behavior test
move it from bugs/xxx.zig to its own category
1 parent 3fb301b commit 9f0fd72

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

test/behavior.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ test {
189189
_ = @import("behavior/merge_error_sets.zig");
190190
_ = @import("behavior/muladd.zig");
191191
_ = @import("behavior/namespace_depends_on_compile_var.zig");
192+
_ = @import("behavior/nan.zig");
192193
_ = @import("behavior/null.zig");
193194
_ = @import("behavior/optional.zig");
194195
_ = @import("behavior/packed-struct.zig");
@@ -253,7 +254,6 @@ test {
253254
builtin.zig_backend != .stage2_c and
254255
builtin.zig_backend != .stage2_spirv64)
255256
{
256-
_ = @import("behavior/bugs/14198.zig");
257257
_ = @import("behavior/export.zig");
258258
}
259259
}

test/behavior/bugs/14198.zig renamed to test/behavior/nan.zig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const builtin = @import("builtin");
12
const std = @import("std");
23
const math = std.math;
34
const mem = std.mem;
@@ -21,6 +22,12 @@ const qnan_f128: f128 = math.nan(f128);
2122
const snan_f128: f128 = math.snan(f128);
2223

2324
test "nan memory equality" {
25+
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
26+
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
27+
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
28+
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
29+
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
30+
2431
// signaled
2532
try testing.expect(mem.eql(u8, mem.asBytes(&snan_u16), mem.asBytes(&snan_f16)));
2633
try testing.expect(mem.eql(u8, mem.asBytes(&snan_u32), mem.asBytes(&snan_f32)));

0 commit comments

Comments
 (0)