diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-10-28 19:41:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-28 19:41:07 +0200 |
| commit | 13c7aa5fefef9b1338951cf0d01c04345201d996 (patch) | |
| tree | 4fd2509ed8a88870a02b655cc29dec77ec0a9f6c /lib/std/fmt/parse_float.zig | |
| parent | d817a3c5173a4f9e41c5872e58733287c9686018 (diff) | |
| parent | 12b5c8156a2ce9c2ef1e5e71a19e86d4876fd457 (diff) | |
| download | zig-13c7aa5fefef9b1338951cf0d01c04345201d996.tar.gz zig-13c7aa5fefef9b1338951cf0d01c04345201d996.zip | |
Merge pull request #17727 from ziglang/elf-memory-deferred
x86_64+elf: do not pass hardcoded memory addresses in prep for build-obj
Diffstat (limited to 'lib/std/fmt/parse_float.zig')
| -rw-r--r-- | lib/std/fmt/parse_float.zig | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/std/fmt/parse_float.zig b/lib/std/fmt/parse_float.zig index eaf06a36f9..00d19ea1c9 100644 --- a/lib/std/fmt/parse_float.zig +++ b/lib/std/fmt/parse_float.zig @@ -2,7 +2,6 @@ pub const parseFloat = @import("parse_float/parse_float.zig").parseFloat; pub const ParseFloatError = @import("parse_float/parse_float.zig").ParseFloatError; const std = @import("std"); -const builtin = @import("builtin"); const math = std.math; const testing = std.testing; const expect = testing.expect; @@ -14,8 +13,6 @@ const epsilon = 1e-7; // See https://github.com/tiehuis/parse-number-fxx-test-data for a wider-selection of test-data. test "fmt.parseFloat" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - inline for ([_]type{ f16, f32, f64, f128 }) |T| { try testing.expectError(error.InvalidCharacter, parseFloat(T, "")); try testing.expectError(error.InvalidCharacter, parseFloat(T, " 1")); @@ -72,8 +69,6 @@ test "fmt.parseFloat" { } test "fmt.parseFloat nan and inf" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - inline for ([_]type{ f16, f32, f64, f128 }) |T| { const Z = std.meta.Int(.unsigned, @typeInfo(T).Float.bits); @@ -88,7 +83,7 @@ test "fmt.parseFloat #11169" { } test "fmt.parseFloat hex.special" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; try testing.expect(math.isNan(try parseFloat(f32, "nAn"))); try testing.expect(math.isPositiveInf(try parseFloat(f32, "iNf"))); @@ -96,8 +91,6 @@ test "fmt.parseFloat hex.special" { try testing.expect(math.isNegativeInf(try parseFloat(f32, "-iNf"))); } test "fmt.parseFloat hex.zero" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0")); try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "-0x0")); try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0p42")); @@ -106,8 +99,6 @@ test "fmt.parseFloat hex.zero" { } test "fmt.parseFloat hex.f16" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testing.expectEqual(try parseFloat(f16, "0x1p0"), 1.0); try testing.expectEqual(try parseFloat(f16, "-0x1p-1"), -0.5); try testing.expectEqual(try parseFloat(f16, "0x10p+10"), 16384.0); @@ -124,8 +115,6 @@ test "fmt.parseFloat hex.f16" { } test "fmt.parseFloat hex.f32" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testing.expectError(error.InvalidCharacter, parseFloat(f32, "0x")); try testing.expectEqual(try parseFloat(f32, "0x1p0"), 1.0); try testing.expectEqual(try parseFloat(f32, "-0x1p-1"), -0.5); |
