Commit 793f031c4c
Changed files (21)
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;
\\
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;
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));
}
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));
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));
}
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();
}
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));
}
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)));
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));
}
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));
}
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));
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);
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));
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));
}
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));
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));
}
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..]);
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);
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;
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;
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 |