1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-11-25 22:31:48 +02:00

Add positive tests

This prevents solving the exercise without a real IntegerOverflow
This commit is contained in:
deafloo
2025-07-21 12:13:32 +02:00
parent f24861957a
commit 4f9f0907c3

View File

@@ -39,6 +39,8 @@ mod tests {
#[test]
fn test_success() {
assert_eq!(divide(81, 9), Ok(9));
assert_eq!(divide(81, -1), Ok(-81));
assert_eq!(divide(i64::MIN, i64::MIN), Ok(1));
}
#[test]