From 793f031c4ca7fdd230ef262895acf3e454be49dd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 14 Jan 2018 15:17:07 -0500 Subject: [PATCH] remove 32-bit windows from supported targets list we still want to support it, but there are too many bugs to claim that we support it right now. See #537 --- README.md | 2 +- src-self-hosted/parser.zig | 6 ------ std/crypto/sha2.zig | 40 -------------------------------------- std/io_test.zig | 5 ----- std/math/acosh.zig | 5 ----- std/math/cos.zig | 5 ----- std/math/cosh.zig | 5 ----- std/math/index.zig | 15 -------------- std/math/ln.zig | 5 ----- std/math/log.zig | 5 ----- std/math/log10.zig | 5 ----- std/math/log2.zig | 5 ----- std/math/pow.zig | 6 ------ std/math/round.zig | 5 ----- std/math/sin.zig | 5 ----- std/math/sinh.zig | 5 ----- std/math/tan.zig | 5 ----- std/math/tanh.zig | 5 ----- std/rand.zig | 20 ------------------- std/sort.zig | 20 ------------------- test/tests.zig | 5 ----- 21 files changed, 1 insertion(+), 178 deletions(-) diff --git a/README.md b/README.md index 084d62a24e..6a9fa4e580 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ that counts as "freestanding" for the purposes of this table. | | freestanding | linux | macosx | windows | other | |-------------|--------------|---------|---------|---------|---------| -|i386 | OK | planned | OK | OK | planned | +|i386 | OK | planned | OK | planned | planned | |x86_64 | OK | OK | OK | OK | planned | |arm | OK | planned | planned | N/A | planned | |aarch64 | OK | planned | planned | planned | planned | diff --git a/src-self-hosted/parser.zig b/src-self-hosted/parser.zig index b4bf9a1377..88b6dd9bb0 100644 --- a/src-self-hosted/parser.zig +++ b/src-self-hosted/parser.zig @@ -1146,12 +1146,6 @@ fn testCanonical(source: []const u8) { } test "zig fmt" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } - testCanonical( \\extern fn puts(s: &const u8) -> c_int; \\ diff --git a/std/crypto/sha2.zig b/std/crypto/sha2.zig index cfe4640fe7..8eba240155 100644 --- a/std/crypto/sha2.zig +++ b/std/crypto/sha2.zig @@ -270,22 +270,12 @@ fn Sha2_32(comptime params: Sha2Params32) -> type { return struct { };} test "sha224 single" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - debug.assert(0xd14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f == Sha224.hash("")); debug.assert(0x23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7 == Sha224.hash("abc")); debug.assert(0xc97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3 == Sha224.hash("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu")); } test "sha224 streaming" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - var h = Sha224.init(); debug.assert(0xd14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f == h.final()); @@ -302,22 +292,12 @@ test "sha224 streaming" { } test "sha256 single" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - debug.assert(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 == Sha256.hash("")); debug.assert(0xba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad == Sha256.hash("abc")); debug.assert(0xcf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1 == Sha256.hash("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu")); } test "sha256 streaming" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - var h = Sha256.init(); debug.assert(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 == h.final()); @@ -621,11 +601,6 @@ fn Sha2_64(comptime params: Sha2Params64) -> type { return struct { };} test "sha384 single" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - const h1 = 0x38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b; debug.assert(h1 == Sha384.hash("")); @@ -637,11 +612,6 @@ test "sha384 single" { } test "sha384 streaming" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - var h = Sha384.init(); const h1 = 0x38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b; @@ -661,11 +631,6 @@ test "sha384 streaming" { } test "sha512 single" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - const h1 = 0xcf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e; debug.assert(h1 == Sha512.hash("")); @@ -677,11 +642,6 @@ test "sha512 single" { } test "sha512 streaming" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // https://github.com/zig-lang/zig/issues/537 - return; - } - var h = Sha512.init(); const h1 = 0xcf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e; diff --git a/std/io_test.zig b/std/io_test.zig index 3b1f646616..1767a546ea 100644 --- a/std/io_test.zig +++ b/std/io_test.zig @@ -8,11 +8,6 @@ const os = std.os; const builtin = @import("builtin"); test "write a file, read it, then delete it" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var data: [1024]u8 = undefined; var rng = Rand.init(1234); rng.fillBytes(data[0..]); diff --git a/std/math/acosh.zig b/std/math/acosh.zig index 150bcd4543..91094302dd 100644 --- a/std/math/acosh.zig +++ b/std/math/acosh.zig @@ -55,11 +55,6 @@ fn acosh64(x: f64) -> f64 { } test "math.acosh" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(acosh(f32(1.5)) == acosh32(1.5)); assert(acosh(f64(1.5)) == acosh64(1.5)); } diff --git a/std/math/cos.zig b/std/math/cos.zig index a65ea1ace8..88a0193db1 100644 --- a/std/math/cos.zig +++ b/std/math/cos.zig @@ -146,11 +146,6 @@ test "math.cos" { } test "math.cos32" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } const epsilon = 0.000001; assert(math.approxEq(f32, cos32(0.0), 1.0, epsilon)); diff --git a/std/math/cosh.zig b/std/math/cosh.zig index 05565d6b3a..6e57e85d14 100644 --- a/std/math/cosh.zig +++ b/std/math/cosh.zig @@ -81,11 +81,6 @@ fn cosh64(x: f64) -> f64 { } test "math.cosh" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(cosh(f32(1.5)) == cosh32(1.5)); assert(cosh(f64(1.5)) == cosh64(1.5)); } diff --git a/std/math/index.zig b/std/math/index.zig index d925740030..07a4d9a731 100644 --- a/std/math/index.zig +++ b/std/math/index.zig @@ -359,11 +359,6 @@ pub fn divTrunc(comptime T: type, numerator: T, denominator: T) -> %T { } test "math.divTrunc" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } testDivTrunc(); comptime testDivTrunc(); } @@ -389,11 +384,6 @@ pub fn divFloor(comptime T: type, numerator: T, denominator: T) -> %T { } test "math.divFloor" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } testDivFloor(); comptime testDivFloor(); } @@ -423,11 +413,6 @@ pub fn divExact(comptime T: type, numerator: T, denominator: T) -> %T { } test "math.divExact" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } testDivExact(); comptime testDivExact(); } diff --git a/std/math/ln.zig b/std/math/ln.zig index c5a5c93842..57e2ffdec8 100644 --- a/std/math/ln.zig +++ b/std/math/ln.zig @@ -147,11 +147,6 @@ pub fn ln_64(x_: f64) -> f64 { } test "math.ln" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(ln(f32(0.2)) == ln_32(0.2)); assert(ln(f64(0.2)) == ln_64(0.2)); } diff --git a/std/math/log.zig b/std/math/log.zig index 4edb77bb1a..6bed4c0da1 100644 --- a/std/math/log.zig +++ b/std/math/log.zig @@ -56,11 +56,6 @@ test "math.log float" { } test "math.log float_special" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(log(f32, 2, 0.2301974) == math.log2(f32(0.2301974))); assert(log(f32, 10, 0.2301974) == math.log10(f32(0.2301974))); diff --git a/std/math/log10.zig b/std/math/log10.zig index 0b6fc31aa7..e27d3eb272 100644 --- a/std/math/log10.zig +++ b/std/math/log10.zig @@ -172,11 +172,6 @@ pub fn log10_64(x_: f64) -> f64 { } test "math.log10" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(log10(f32(0.2)) == log10_32(0.2)); assert(log10(f64(0.2)) == log10_64(0.2)); } diff --git a/std/math/log2.zig b/std/math/log2.zig index a9789e47cf..7839759974 100644 --- a/std/math/log2.zig +++ b/std/math/log2.zig @@ -170,11 +170,6 @@ pub fn log2_64(x_: f64) -> f64 { } test "math.log2" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(log2(f32(0.2)) == log2_32(0.2)); assert(log2(f64(0.2)) == log2_64(0.2)); } diff --git a/std/math/pow.zig b/std/math/pow.zig index b21fb3a921..c0157ff16e 100644 --- a/std/math/pow.zig +++ b/std/math/pow.zig @@ -176,12 +176,6 @@ fn isOddInteger(x: f64) -> bool { } test "math.pow" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } - const epsilon = 0.000001; assert(math.approxEq(f32, pow(f32, 0.0, 3.3), 0.0, epsilon)); diff --git a/std/math/round.zig b/std/math/round.zig index 3abee040ef..06b9e41f58 100644 --- a/std/math/round.zig +++ b/std/math/round.zig @@ -98,11 +98,6 @@ test "math.round" { } test "math.round32" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(round32(1.3) == 1.0); assert(round32(-1.3) == -1.0); assert(round32(0.2) == 0.0); diff --git a/std/math/sin.zig b/std/math/sin.zig index 99008af469..5b1090e99e 100644 --- a/std/math/sin.zig +++ b/std/math/sin.zig @@ -150,11 +150,6 @@ test "math.sin" { } test "math.sin32" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } const epsilon = 0.000001; assert(math.approxEq(f32, sin32(0.0), 0.0, epsilon)); diff --git a/std/math/sinh.zig b/std/math/sinh.zig index ca06bc615a..b0057f897b 100644 --- a/std/math/sinh.zig +++ b/std/math/sinh.zig @@ -88,11 +88,6 @@ fn sinh64(x: f64) -> f64 { } test "math.sinh" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(sinh(f32(1.5)) == sinh32(1.5)); assert(sinh(f64(1.5)) == sinh64(1.5)); } diff --git a/std/math/tan.zig b/std/math/tan.zig index e62e9b8899..9afe102d64 100644 --- a/std/math/tan.zig +++ b/std/math/tan.zig @@ -136,11 +136,6 @@ test "math.tan" { } test "math.tan32" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } const epsilon = 0.000001; assert(math.approxEq(f32, tan32(0.0), 0.0, epsilon)); diff --git a/std/math/tanh.zig b/std/math/tanh.zig index 813b4f4561..8560538cdf 100644 --- a/std/math/tanh.zig +++ b/std/math/tanh.zig @@ -112,11 +112,6 @@ fn tanh64(x: f64) -> f64 { } test "math.tanh" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } assert(tanh(f32(1.5)) == tanh32(1.5)); assert(tanh(f64(1.5)) == tanh64(1.5)); } diff --git a/std/rand.zig b/std/rand.zig index 09109cfbf7..5f4c9c2015 100644 --- a/std/rand.zig +++ b/std/rand.zig @@ -194,11 +194,6 @@ fn MersenneTwister( } test "rand float 32" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var r = Rand.init(42); var i: usize = 0; while (i < 1000) : (i += 1) { @@ -209,11 +204,6 @@ test "rand float 32" { } test "rand.MT19937_64" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var rng = MT19937_64.init(rand_test.mt64_seed); for (rand_test.mt64_data) |value| { assert(value == rng.get()); @@ -221,11 +211,6 @@ test "rand.MT19937_64" { } test "rand.MT19937_32" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var rng = MT19937_32.init(rand_test.mt32_seed); for (rand_test.mt32_data) |value| { assert(value == rng.get()); @@ -233,11 +218,6 @@ test "rand.MT19937_32" { } test "rand.Rand.range" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var r = Rand.init(42); testRange(&r, -4, 3); testRange(&r, -4, -1); diff --git a/std/sort.zig b/std/sort.zig index 02cb9acb2e..8554ab495a 100644 --- a/std/sort.zig +++ b/std/sort.zig @@ -1020,11 +1020,6 @@ fn cmpByValue(a: &const IdAndValue, b: &const IdAndValue) -> bool { } test "std.sort" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } const u8cases = [][]const []const u8 { [][]const u8{"", ""}, [][]const u8{"a", "a"}, @@ -1061,11 +1056,6 @@ test "std.sort" { } test "std.sort descending" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } const rev_cases = [][]const []const i32 { [][]const i32{[]i32{}, []i32{}}, [][]const i32{[]i32{1}, []i32{1}}, @@ -1085,11 +1075,6 @@ test "std.sort descending" { } test "another sort case" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var arr = []i32{ 5, 3, 1, 2, 4 }; sort(i32, arr[0..], i32asc); @@ -1097,11 +1082,6 @@ test "another sort case" { } test "sort fuzz testing" { - if (builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch.i386) { - // TODO get this test passing - // https://github.com/zig-lang/zig/issues/537 - return; - } var rng = std.rand.Rand.init(0x12345678); const test_case_count = 10; var i: usize = 0; diff --git a/test/tests.zig b/test/tests.zig index 20e1e94459..4969379a6d 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -42,11 +42,6 @@ const test_targets = []TestTarget { .arch = builtin.Arch.x86_64, .environ = builtin.Environ.msvc, }, - TestTarget { - .os = builtin.Os.windows, - .arch = builtin.Arch.i386, - .environ = builtin.Environ.msvc, - }, }; error TestFailed;