authorgravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-04-08 22:39:14-07:00
committergravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-04-12 10:25:29-07:00
log04dd43934a94d087001659a577bda1f514e1df5d
tree74cea567501f143775650c3a7eb140896e31fc06
parent1c1cfe1533a6d38cf3fcdd998637afdbb12910a8

Skip some floatXiYf tests on non-x86 platforms

These need to be skipped because of a bug with `@floatToInt` on stage1: https://github.com/ziglang/zig/issues/11408

1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/special/compiler_rt/floatXiYf_test.zig+4
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("std");1const std = @import("std");
2const builtin = @import("builtin");
2const testing = std.testing;3const testing = std.testing;
3const math = std.math;4const math = std.math;
4const floatXiYf = @import("floatXiYf.zig").floatXiYf;5const floatXiYf = @import("floatXiYf.zig").floatXiYf;
...@@ -809,6 +810,9 @@ test "conversion to f32" {...@@ -809,6 +810,9 @@ test "conversion to f32" {
809}810}
810811
811test "conversion to f80" {812test "conversion to f80" {
813 if (builtin.zig_backend == .stage1 and builtin.cpu.arch != .x86_64)
814 return error.SkipZigTest; // https://github.com/ziglang/zig/issues/11408
815
812 try testing.expect(floatXiYf(f80, @as(i80, -12)) == -12);816 try testing.expect(floatXiYf(f80, @as(i80, -12)) == -12);
813 try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u64, math.maxInt(u64)) + 0)) == math.maxInt(u64) + 0);817 try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u64, math.maxInt(u64)) + 0)) == math.maxInt(u64) + 0);
814 try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u80, math.maxInt(u64)) + 1)) == math.maxInt(u64) + 1);818 try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u80, math.maxInt(u64)) + 1)) == math.maxInt(u64) + 1);