commit ee85c8b6d05dbda541d4b0b8b402aafad8e582a3 (tree)
parent d835a6ba9ac11773f8ae1c3b2c5e9241cf875ee9
Author: Rue <78876133+IOKG04@users.noreply.github.com>
Date: Sat, 16 Aug 2025 04:36:09 +0200
re-enable std.math.modf vector tests (#24786)
* re-enable std.math.modf vector tests
* re-disable std.math.modf vector tests for `aarch64-macos`
* re-disable for s390x architecture
Diffstat:
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/lib/std/math/modf.zig b/lib/std/math/modf.zig
@@ -1,4 +1,5 @@
const std = @import("../std.zig");
+const builtin = @import("builtin");
const math = std.math;
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
@@ -84,18 +85,10 @@ fn ModfTests(comptime T: type) type {
try expectApproxEqAbs(expected_c, r.fpart, epsilon);
}
test "vector" {
- // Currently, a compiler bug is breaking the usage
- // of @trunc on @Vector types
+ if (builtin.os.tag == .macos and builtin.cpu.arch == .aarch64) return error.SkipZigTest;
+ if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
- // TODO: Repopulate the below array and
- // remove the skip statement once this
- // bug is fixed
-
- // const widths = [_]comptime_int{ 1, 2, 3, 4, 8, 16 };
- const widths = [_]comptime_int{};
-
- if (widths.len == 0)
- return error.SkipZigTest;
+ const widths = [_]comptime_int{ 1, 2, 3, 4, 8, 16 };
inline for (widths) |len| {
const V: type = @Vector(len, T);