diff --git a/exercises/tests/tests1.rs b/exercises/tests/tests1.rs index 50586a1..9b14ed1 100644 --- a/exercises/tests/tests1.rs +++ b/exercises/tests/tests1.rs @@ -6,12 +6,10 @@ // This test has a problem with it -- make the test compile! Make the test // pass! Make the test fail! Execute `rustlings hint tests1` for hints :) -// I AM NOT DONE - #[cfg(test)] mod tests { #[test] fn you_can_assert() { - assert!(); + assert!(1 == 1); } } diff --git a/exercises/tests/tests2.rs b/exercises/tests/tests2.rs index 0d981ad..6bfcd09 100644 --- a/exercises/tests/tests2.rs +++ b/exercises/tests/tests2.rs @@ -2,12 +2,10 @@ // This test has a problem with it -- make the test compile! Make the test // pass! Make the test fail! Execute `rustlings hint tests2` for hints :) -// I AM NOT DONE - #[cfg(test)] mod tests { #[test] fn you_can_assert_eq() { - assert_eq!(); + assert_eq!(1, 1); } } diff --git a/exercises/tests/tests3.rs b/exercises/tests/tests3.rs index 693b8aa..364bfee 100644 --- a/exercises/tests/tests3.rs +++ b/exercises/tests/tests3.rs @@ -4,8 +4,6 @@ // we expect to get when we call `is_even(5)`. // Execute `rustlings hint tests3` for hints :) -// I AM NOT DONE - pub fn is_even(num: i32) -> bool { num % 2 == 0 } @@ -16,6 +14,11 @@ mod tests { #[test] fn is_true_when_even() { - assert!(); + assert!(is_even(2)); + } + + #[test] + fn is_false_when_odd() { + assert!(!is_even(5)); } }