| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| | 2 | const builtin = @import("builtin"); |
| 2 | const testing = std.testing; | 3 | const testing = std.testing; |
| 3 | const math = std.math; | 4 | const math = std.math; |
| 4 | const floatXiYf = @import("floatXiYf.zig").floatXiYf; | 5 | const floatXiYf = @import("floatXiYf.zig").floatXiYf; |
| ... | @@ -809,6 +810,9 @@ test "conversion to f32" { | ... | @@ -809,6 +810,9 @@ test "conversion to f32" { |
| 809 | } | 810 | } |
| 810 | | 811 | |
| 811 | test "conversion to f80" { | 812 | test "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); |