| author | |
| committer | |
| log | 1eb22e7ad6f700a72d34cdb36e614c95bdab0464 |
| tree | 3ed8ffa65e6798d6d18986c0ee08a4ae332da9af |
| parent | 91dba79c48f0a309e014062f2fe311a5c46b1084 |
| signature |
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 windows2 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; // TODO | 1430 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1431 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1431 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1432 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1432 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1433 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | ||
| 1433 | 1434 | ||
| 1434 | if (builtin.os.tag == .windows) { | 1435 | if (builtin.os.tag == .windows) { |
| 1435 | // https://github.com/ziglang/zig/issues/12396 | 1436 | // https://github.com/ziglang/zig/issues/12396 |
test/c_abi/main.zig+6| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const print = std.debug.print; | 3 | const print = std.debug.print; |
| 3 | const expect = std.testing.expect; | 4 | const expect = std.testing.expect; |
| 4 | 5 | ||
| ... | @@ -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 | |||
| 112 | test "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 | } |
| 111 | 116 | ||
| ... | @@ -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 | } |
| 118 | export fn zig_longdouble(x: c_longdouble) void { | 123 | export 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 | } |
| 121 | 127 |