From 8ad30c1dfe977c218884acbf3bceb2daae9479a8 Mon Sep 17 00:00:00 2001 From: Tyler Cardinal <83625450+tjcardinal@users.noreply.github.com> Date: Sun, 16 May 2021 01:16:23 -0500 Subject: [PATCH] Complete quiz3 exercise (#19) --- exercises/quiz3.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/exercises/quiz3.rs b/exercises/quiz3.rs index fae0eed..0bad189 100644 --- a/exercises/quiz3.rs +++ b/exercises/quiz3.rs @@ -7,8 +7,6 @@ // we expect to get when we call `times_two` with a negative number. // No hints, you can do this :) -// I AM NOT DONE - pub fn times_two(num: i32) -> i32 { num * 2 } @@ -19,12 +17,11 @@ mod tests { #[test] fn returns_twice_of_positive_numbers() { - assert_eq!(times_two(4), ???); + assert_eq!(times_two(4), 8); } #[test] fn returns_twice_of_negative_numbers() { - // TODO replace unimplemented!() with an assert for `times_two(-4)` - unimplemented!() + assert_eq!(times_two(-4), -8); } }