diff options
| author | Marc Tiehuis <marc@tiehu.is> | 2024-07-14 00:46:16 +1200 |
|---|---|---|
| committer | Marc Tiehuis <marc@tiehu.is> | 2024-07-14 11:19:34 +1200 |
| commit | 944c6d40ce520f345450a15006498dd760fc3d3a (patch) | |
| tree | e28b532532657b1ff7f3f26b8ca380223d7e55c4 /lib | |
| parent | 8ff01f78f314a743df8c8f085a02416bb1ce0c72 (diff) | |
| download | zig-944c6d40ce520f345450a15006498dd760fc3d3a.tar.gz zig-944c6d40ce520f345450a15006498dd760fc3d3a.zip | |
std.fmt.formatFloat: skip f80 round-trip tests on x86_64 windows
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/fmt/format_float.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/fmt/format_float.zig b/lib/std/fmt/format_float.zig index d0ae7624e4..b7b08281a7 100644 --- a/lib/std/fmt/format_float.zig +++ b/lib/std/fmt/format_float.zig @@ -1513,6 +1513,8 @@ const FLOAT128_POW5_INV_ERRORS: [154]u64 = .{ // zig fmt: on +const builtin = @import("builtin"); + fn check(comptime T: type, value: T, comptime expected: []const u8) !void { const I = @Type(.{ .Int = .{ .signedness = .unsigned, .bits = @bitSizeOf(T) } }); @@ -1521,6 +1523,8 @@ fn check(comptime T: type, value: T, comptime expected: []const u8) !void { const s = try formatFloat(&buf, value, .{}); try std.testing.expectEqualStrings(expected, s); + if (T == f80 and builtin.target.os.tag == .windows and builtin.target.cpu.arch == .x86_64) return; + const o = try std.fmt.parseFloat(T, s); const o_bits: I = @bitCast(o); |
