mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
categorize nan behavior test
move it from bugs/xxx.zig to its own category
This commit is contained in:
parent
3fb301b16a
commit
9f0fd72321
@ -189,6 +189,7 @@ test {
|
||||
_ = @import("behavior/merge_error_sets.zig");
|
||||
_ = @import("behavior/muladd.zig");
|
||||
_ = @import("behavior/namespace_depends_on_compile_var.zig");
|
||||
_ = @import("behavior/nan.zig");
|
||||
_ = @import("behavior/null.zig");
|
||||
_ = @import("behavior/optional.zig");
|
||||
_ = @import("behavior/packed-struct.zig");
|
||||
@ -253,7 +254,6 @@ test {
|
||||
builtin.zig_backend != .stage2_c and
|
||||
builtin.zig_backend != .stage2_spirv64)
|
||||
{
|
||||
_ = @import("behavior/bugs/14198.zig");
|
||||
_ = @import("behavior/export.zig");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
const builtin = @import("builtin");
|
||||
const std = @import("std");
|
||||
const math = std.math;
|
||||
const mem = std.mem;
|
||||
@ -21,6 +22,12 @@ const qnan_f128: f128 = math.nan(f128);
|
||||
const snan_f128: f128 = math.snan(f128);
|
||||
|
||||
test "nan memory equality" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
// signaled
|
||||
try testing.expect(mem.eql(u8, mem.asBytes(&snan_u16), mem.asBytes(&snan_f16)));
|
||||
try testing.expect(mem.eql(u8, mem.asBytes(&snan_u32), mem.asBytes(&snan_f32)));
|
||||
Loading…
x
Reference in New Issue
Block a user