aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-10-24 05:34:13 -0400
committerGitHub <noreply@github.com>2023-10-24 05:34:13 -0400
commitbb0419599aa93455f3ae0969f4bfd80204807596 (patch)
treeedce35a16131dbe5ce31a62cbbf7ac8f2dfca0bc /lib/std/math.zig
parentb477279c37d1ca1c141a3e30589bd974687b85cc (diff)
parentf7482a5c95dd549eb3da103eab42bac881ba0498 (diff)
downloadzig-bb0419599aa93455f3ae0969f4bfd80204807596.tar.gz
zig-bb0419599aa93455f3ae0969f4bfd80204807596.zip
Merge pull request #17666 from jacobly0/x86_64-unicode
x86_64: pass more std tests
Diffstat (limited to 'lib/std/math.zig')
-rw-r--r--lib/std/math.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig
index 57376f4d61..f110efa0af 100644
--- a/lib/std/math.zig
+++ b/lib/std/math.zig
@@ -903,12 +903,12 @@ pub fn mod(comptime T: type, numerator: T, denominator: T) !T {
}
test "mod" {
+ if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
+
try testMod();
try comptime testMod();
}
fn testMod() !void {
- if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
-
try testing.expect((mod(i32, -5, 3) catch unreachable) == 1);
try testing.expect((mod(i32, 5, 3) catch unreachable) == 2);
try testing.expectError(error.NegativeDenominator, mod(i32, 10, -1));