Commit 1eb22e7ad6

Luuk de Gram <luuk@degram.dev>
2022-08-26 22:00:22
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
1 parent 91dba79
Changed files (2)
test
behavior
c_abi
test/behavior/cast.zig
@@ -1430,6 +1430,7 @@ test "coerce between pointers of compatible differently-named floats" {
     if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
     if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
     if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
+    if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
 
     if (builtin.os.tag == .windows) {
         // https://github.com/ziglang/zig/issues/12396
test/c_abi/main.zig
@@ -1,4 +1,5 @@
 const std = @import("std");
+const builtin = @import("builtin");
 const print = std.debug.print;
 const expect = std.testing.expect;
 
@@ -106,6 +107,10 @@ test "C ABI floats" {
     c_f32(12.34);
     c_f64(56.78);
     c_five_floats(1.0, 2.0, 3.0, 4.0, 5.0);
+}
+
+test "C ABI long double" {
+    if (!builtin.cpu.arch.isWasm()) return error.SkipZigTest;
     c_long_double(12.34);
 }
 
@@ -116,6 +121,7 @@ export fn zig_f64(x: f64) void {
     expect(x == 56.78) catch @panic("test failure: zig_f64");
 }
 export fn zig_longdouble(x: c_longdouble) void {
+    if (!builtin.cpu.arch.isWasm()) return; // waiting for #1481
     expect(x == 12.34) catch @panic("test failure: zig_longdouble");
 }