aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
diff options
context:
space:
mode:
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));