mirror of
https://github.com/ziglang/zig.git
synced 2025-12-23 14:43:17 +00:00
test: Skip some floating point tests that fail on arm-linux-(gnu,musl)eabi.
https://github.com/ziglang/zig/issues/21234
This commit is contained in:
parent
5285f41267
commit
26119bd98d
@ -3,6 +3,7 @@
|
|||||||
//
|
//
|
||||||
// https://git.musl-libc.org/cgit/musl/tree/src/math/tgamma.c
|
// https://git.musl-libc.org/cgit/musl/tree/src/math/tgamma.c
|
||||||
|
|
||||||
|
const builtin = @import("builtin");
|
||||||
const std = @import("../std.zig");
|
const std = @import("../std.zig");
|
||||||
|
|
||||||
/// Returns the gamma function of x,
|
/// Returns the gamma function of x,
|
||||||
@ -262,6 +263,8 @@ test gamma {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test "gamma.special" {
|
test "gamma.special" {
|
||||||
|
if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||||
|
|
||||||
inline for (&.{ f32, f64 }) |T| {
|
inline for (&.{ f32, f64 }) |T| {
|
||||||
try expect(std.math.isNan(gamma(T, -std.math.nan(T))));
|
try expect(std.math.isNan(gamma(T, -std.math.nan(T))));
|
||||||
try expect(std.math.isNan(gamma(T, std.math.nan(T))));
|
try expect(std.math.isNan(gamma(T, std.math.nan(T))));
|
||||||
|
|||||||
@ -126,6 +126,7 @@ test "cmp f16" {
|
|||||||
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||||
|
if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||||
|
|
||||||
try testCmp(f16);
|
try testCmp(f16);
|
||||||
try comptime testCmp(f16);
|
try comptime testCmp(f16);
|
||||||
@ -134,6 +135,7 @@ test "cmp f16" {
|
|||||||
test "cmp f32/f64" {
|
test "cmp f32/f64" {
|
||||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||||
|
if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||||
|
|
||||||
try testCmp(f32);
|
try testCmp(f32);
|
||||||
try comptime testCmp(f32);
|
try comptime testCmp(f32);
|
||||||
|
|||||||
@ -1597,6 +1597,7 @@ test "NaN comparison" {
|
|||||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||||
|
if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||||
|
|
||||||
try testNanEqNan(f16);
|
try testNanEqNan(f16);
|
||||||
try testNanEqNan(f32);
|
try testNanEqNan(f32);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user