mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-11-05 05:05:36 +00:00
update patch for 102 to match
This commit is contained in:
parent
87358c610b
commit
a5622fd5a8
|
|
@ -1,18 +1,18 @@
|
||||||
--- exercises/102_testing.zig 2023-10-03 22:15:22.125574535 +0200
|
--- exercises/102_testing.zig 2025-10-24 12:54:56
|
||||||
+++ answers/102_testing.zig 2023-10-05 20:04:07.302771500 +0200
|
+++ answers/102_testing.zig 2025-10-24 12:56:33
|
||||||
@@ -83,7 +83,7 @@
|
@@ -71,7 +71,7 @@
|
||||||
// an error that you need
|
// The corresponding test is not much different from the previous one. Except
|
||||||
// to correct.
|
// that it contains an error that you need to correct.
|
||||||
test "sub" {
|
test "sub" {
|
||||||
- try testing.expect(sub(10, 5) == 6);
|
- try testing.expect(sub(10, 5) == 6);
|
||||||
+ try testing.expect(sub(10, 5) == 5);
|
+ try testing.expect(sub(10, 5) == 5);
|
||||||
|
|
||||||
try testing.expect(sub(3, 1.5) == 1.5);
|
try testing.expect(sub(3, 1.5) == 1.5);
|
||||||
}
|
}
|
||||||
@@ -108,5 +108,5 @@
|
@@ -92,5 +92,5 @@
|
||||||
// Now we test if the function returns an error
|
|
||||||
// if we pass a zero as denominator.
|
// Now we test if the function returns an error if we pass a zero as
|
||||||
// But which error needs to be tested?
|
// denominator. But which error needs to be tested?
|
||||||
- try testing.expectError(error.???, divide(15, 0));
|
- try testing.expectError(error.???, divide(15, 0));
|
||||||
+ try testing.expectError(error.DivisionByZero, divide(15, 0));
|
+ try testing.expectError(error.DivisionByZero, divide(15, 0));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user