Skip to content

Commit

Permalink
remove 32-bit windows from supported targets list
Browse files Browse the repository at this point in the history
we still want to support it, but there are too many bugs
to claim that we support it right now.

See #537
  • Loading branch information
andrewrk committed Jan 14, 2018
1 parent e7e7625 commit 793f031
Show file tree
Hide file tree
Showing 21 changed files with 1 addition and 178 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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 |
Expand Down
6 changes: 0 additions & 6 deletions src-self-hosted/parser.zig
Expand Up @@ -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;
\\
Expand Down
40 changes: 0 additions & 40 deletions std/crypto/sha2.zig
Expand Up @@ -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());
Expand All @@ -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());
Expand Down Expand Up @@ -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(""));

Expand All @@ -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;
Expand All @@ -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(""));

Expand All @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions std/io_test.zig
Expand Up @@ -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..]);
Expand Down
5 changes: 0 additions & 5 deletions std/math/acosh.zig
Expand Up @@ -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));
}
Expand Down
5 changes: 0 additions & 5 deletions std/math/cos.zig
Expand Up @@ -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));
Expand Down
5 changes: 0 additions & 5 deletions std/math/cosh.zig
Expand Up @@ -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));
}
Expand Down
15 changes: 0 additions & 15 deletions std/math/index.zig
Expand Up @@ -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();
}
Expand All @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down
5 changes: 0 additions & 5 deletions std/math/ln.zig
Expand Up @@ -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));
}
Expand Down
5 changes: 0 additions & 5 deletions std/math/log.zig
Expand Up @@ -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)));

Expand Down
5 changes: 0 additions & 5 deletions std/math/log10.zig
Expand Up @@ -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));
}
Expand Down
5 changes: 0 additions & 5 deletions std/math/log2.zig
Expand Up @@ -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));
}
Expand Down
6 changes: 0 additions & 6 deletions std/math/pow.zig
Expand Up @@ -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));
Expand Down
5 changes: 0 additions & 5 deletions std/math/round.zig
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions std/math/sin.zig
Expand Up @@ -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));
Expand Down
5 changes: 0 additions & 5 deletions std/math/sinh.zig
Expand Up @@ -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));
}
Expand Down
5 changes: 0 additions & 5 deletions std/math/tan.zig
Expand Up @@ -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));
Expand Down
5 changes: 0 additions & 5 deletions std/math/tanh.zig
Expand Up @@ -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));
}
Expand Down
20 changes: 0 additions & 20 deletions std/rand.zig
Expand Up @@ -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) {
Expand All @@ -209,35 +204,20 @@ 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());
}
}

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());
}
}

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);
Expand Down

0 comments on commit 793f031

Please sign in to comment.