mirror of
https://github.com/kmc7468/cs220.git
synced 2025-12-16 15:08:45 +00:00
Update tests
This commit is contained in:
@@ -3,22 +3,22 @@ mod test {
|
||||
use super::super::assignment01::*;
|
||||
|
||||
#[test]
|
||||
fn add_7_3() {
|
||||
fn test_add_7_3() {
|
||||
assert_eq!(add(7, 3), 10);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn add_overflow() {
|
||||
fn test_add_overflow() {
|
||||
assert_eq!(add(usize::MAX, 1), usize::MIN);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sub_7_3() {
|
||||
fn test_sub_7_3() {
|
||||
assert_eq!(sub(7, 3), 4);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sub_overflow() {
|
||||
fn test_sub_overflow() {
|
||||
assert_eq!(sub(usize::MIN, 1), usize::MAX);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user