Skip to content

Commit da507c0

Browse files
committed
std.fmt.formatFloat: skip f80 round-trip tests on x86_64 windows
1 parent 431a0d4 commit da507c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/std/fmt/format_float.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,8 @@ const FLOAT128_POW5_INV_ERRORS: [154]u64 = .{
15131513

15141514
// zig fmt: on
15151515

1516+
const builtin = @import("builtin");
1517+
15161518
fn check(comptime T: type, value: T, comptime expected: []const u8) !void {
15171519
const I = @Type(.{ .Int = .{ .signedness = .unsigned, .bits = @bitSizeOf(T) } });
15181520

@@ -1521,6 +1523,8 @@ fn check(comptime T: type, value: T, comptime expected: []const u8) !void {
15211523
const s = try formatFloat(&buf, value, .{});
15221524
try std.testing.expectEqualStrings(expected, s);
15231525

1526+
if (T == f80 and builtin.target.os.tag == .windows and builtin.target.cpu.arch == .x86_64) return;
1527+
15241528
const o = try std.fmt.parseFloat(T, s);
15251529
const o_bits: I = @bitCast(o);
15261530

0 commit comments

Comments
 (0)