From a71bc62c29cebec115700d98a61d618e0c7a83b9 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Mon, 22 Apr 2019 00:09:30 +0200 Subject: [PATCH] Add errors to exercises that compile without user changes --- exercises/move_semantics/move_semantics4.rs | 3 ++- exercises/test2.rs | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/exercises/move_semantics/move_semantics4.rs b/exercises/move_semantics/move_semantics4.rs index 903a330..d47e009 100644 --- a/exercises/move_semantics/move_semantics4.rs +++ b/exercises/move_semantics/move_semantics4.rs @@ -16,7 +16,8 @@ fn main() { } -fn fill_vec(vec: Vec) -> Vec { +// `fill_vec()` no longer take `vec: Vec` as argument +fn fill_vec() -> Vec { let mut vec = vec; vec.push(22); diff --git a/exercises/test2.rs b/exercises/test2.rs index 249abbc..75a4739 100644 --- a/exercises/test2.rs +++ b/exercises/test2.rs @@ -17,6 +17,11 @@ mod tests { #[test] fn returns_twice_of_positive_numbers() { - assert_eq!(4, 4); + assert_eq!(times_two(4), ???); + } + + #[test] + fn returns_twice_of_negative_numbers() { + // TODO write an assert for `times_two(-4)` } }