Skip to content

Commit

Permalink
Add errors to exercises that compile without user changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Sraka committed Apr 21, 2019
1 parent 4b0b709 commit a71bc62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion exercises/move_semantics/move_semantics4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ fn main() {

}

fn fill_vec(vec: Vec<i32>) -> Vec<i32> {
// `fill_vec()` no longer take `vec: Vec<i32>` as argument
fn fill_vec() -> Vec<i32> {
let mut vec = vec;

vec.push(22);
Expand Down
7 changes: 6 additions & 1 deletion exercises/test2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
}
}

0 comments on commit a71bc62

Please sign in to comment.