authorgravatar for luuk@degram.devLuuk de Gram <luuk@degram.dev> 2022-08-26 22:00:22+02:00
committergravatar for luuk@degram.devLuuk de Gram <luuk@degram.dev> 2022-08-28 17:50:07+02:00
log1eb22e7ad6f700a72d34cdb36e614c95bdab0464
tree3ed8ffa65e6798d6d18986c0ee08a4ae332da9af
parent91dba79c48f0a309e014062f2fe311a5c46b1084
signaturelock-open Commit is signed but in an unrecognized format.

wasm: skip unimplemented behavior test

Since now the size of a c_longdouble is correctly 16 bytes, the test is no longer passing. It was previously accidentally passing due to incorrect sizing and it not being larger than the size of a f64. disable long_double test for windows

2 files changed, 7 insertions(+), 0 deletions(-)

test/behavior/cast.zig+1
...@@ -1430,6 +1430,7 @@ test "coerce between pointers of compatible differently-named floats" {...@@ -1430,6 +1430,7 @@ test "coerce between pointers of compatible differently-named floats" {
1430 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO1430 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
1431 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO1431 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
1432 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO1432 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
1433 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
14331434
1434 if (builtin.os.tag == .windows) {1435 if (builtin.os.tag == .windows) {
1435 // https://github.com/ziglang/zig/issues/123961436 // https://github.com/ziglang/zig/issues/12396
test/c_abi/main.zig+6
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1const std = @import("std");1const std = @import("std");
2const builtin = @import("builtin");
2const print = std.debug.print;3const print = std.debug.print;
3const expect = std.testing.expect;4const expect = std.testing.expect;
45
...@@ -106,6 +107,10 @@ test "C ABI floats" {...@@ -106,6 +107,10 @@ test "C ABI floats" {
106 c_f32(12.34);107 c_f32(12.34);
107 c_f64(56.78);108 c_f64(56.78);
108 c_five_floats(1.0, 2.0, 3.0, 4.0, 5.0);109 c_five_floats(1.0, 2.0, 3.0, 4.0, 5.0);
110}
111
112test "C ABI long double" {
113 if (!builtin.cpu.arch.isWasm()) return error.SkipZigTest;
109 c_long_double(12.34);114 c_long_double(12.34);
110}115}
111116
...@@ -116,6 +121,7 @@ export fn zig_f64(x: f64) void {...@@ -116,6 +121,7 @@ export fn zig_f64(x: f64) void {
116 expect(x == 56.78) catch @panic("test failure: zig_f64");121 expect(x == 56.78) catch @panic("test failure: zig_f64");
117}122}
118export fn zig_longdouble(x: c_longdouble) void {123export fn zig_longdouble(x: c_longdouble) void {
124 if (!builtin.cpu.arch.isWasm()) return; // waiting for #1481
119 expect(x == 12.34) catch @panic("test failure: zig_longdouble");125 expect(x == 12.34) catch @panic("test failure: zig_longdouble");
120}126}
121127