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 084d62a24ec506a658c0c2209f1f1b9a590bab91..6a9fa4e580e97916e0340312cb3d9abbaceb2d82 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 b4bf9a1377e7b36217e8f287bca25600442125bc..88b6dd9bb0a25c57ac2d1fa668fb08d2772d86c5 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 cfe4640fe788109ae78e22221283a65c39ef2938..8eba24015595452efe7c3c9fd938484d0636fca5 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 3b1f6466163d5426ac47ee5af4a89dd52a4b1742..1767a546ea490c7b892df7340f641b34448f96ce 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 150bcd4543af42997b8b7b6f2096e9dc2a822e81..91094302dd03d6b07ac590d05855065c7aa05454 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 a65ea1ace80835ae2d46cd41c7108b47f22b4fb8..88a0193db1654f8e2e17a8a52afaf9fe9f941481 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 05565d6b3ab677bddc2066b3a662bd1ce5764df4..6e57e85d141080238edf61af0304feb064ea0e62 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 d925740030df1c092f5e60768b0fbe5342f4631b..07a4d9a7319e5a4786b7788b71bf6ac26ce35eff 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 c5a5c93842cccbaa0a888d2cba1be8c7c53da521..57e2ffdec80e27e6b5de9e84c6694fed46e553ed 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 4edb77bb1a96076c4773ebd83c0a94e445965b4d..6bed4c0da109b629a431e8f3941db0b251583c60 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 0b6fc31aa774896d890e5b1ce4f164d3d92f7912..e27d3eb272629893ba120c576201ccedb6d05644 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 a9789e47cfbe936b2fa4fd3e4232cc58ceffbd51..783975997451b02bd7b416ff8cd3d119af72deb1 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 b21fb3a9213b46a5fdb84de7b63dfe0a59ae32f8..c0157ff16eee181cc56d9c05e3b405d1b5633ba5 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 3abee040ef74856810e60006668d86b95b14adc5..06b9e41f583762ae88a54d8925c0d79fdd7fd086 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 99008af469e1bbd12198384005e16e0deefc8d4b..5b1090e99e711bcee585a95456efc158288a4e21 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 ca06bc615a75b7df86423802c953c115cd61ccb2..b0057f897b996dd9c29ef08b5490b293869ab8ea 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 e62e9b889936a7977c34156858b490481da080df..9afe102d640e782ce567d4228d8c989bc8a0780c 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 813b4f4561c60ca164cdea38e2b4e5ebff0e413f..8560538cdf7fd09ba55893e4cbdb2727e0857d4a 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 09109cfbf7da5f167f61ae823bd8ad5cfc5aa3bc..5f4c9c201543f4ffa88777534f7f28ab2ce0842f 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 02cb9acb2e9b7077edf319c0c63b1f1ccabc8280..8554ab495aa5147fe9a2481c2f535d8c5e383f27 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 20e1e9445992df46dbc9721fb956da5a5be38c52..4969379a6d6513ab8cb4538d2510edd983d4a13f 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; -- 2.54.0