diff options
| author | marisa <mokou@posteo.de> | 2019-11-11 16:51:38 +0100 |
|---|---|---|
| committer | marisa <mokou@posteo.de> | 2019-11-11 16:51:38 +0100 |
| commit | 9bdb0a12e45a8e9f9f6a4bd4a9c172c5376c7f60 (patch) | |
| tree | 3c4a094d57ecedf9706e0ba567a9f157590177c8 /exercises/tests/tests3.rs | |
| parent | 627cdc07d07dfe6a740e885e0ddf6900e7ec336b (diff) | |
feat: Refactor hint system
Hints are now accessible using the CLI subcommand `rustlings hint
<exercise name`.
BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
Diffstat (limited to 'exercises/tests/tests3.rs')
| -rw-r--r-- | exercises/tests/tests3.rs | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/exercises/tests/tests3.rs b/exercises/tests/tests3.rs index e10d2aa..0f244b3 100644 --- a/exercises/tests/tests3.rs +++ b/exercises/tests/tests3.rs @@ -1,7 +1,8 @@ // tests3.rs // This test isn't testing our function -- make it do that in such a way that // the test passes. Then write a second test that tests whether we get the result -// we expect to get when we call `is_even(5)`. Scroll down for hints! +// we expect to get when we call `is_even(5)`. +// Execute `rustlings hint tests3` for hints :) pub fn is_even(num: i32) -> bool { num % 2 == 0 @@ -16,28 +17,3 @@ mod tests { assert!(); } } - - - - - - - - - - - - - - - - - - - - - - -// You can call a function right where you're passing arguments to `assert!` -- so you could do -// something like `assert!(having_fun())`. If you want to check that you indeed get false, you -// can negate the result of what you're doing using `!`, like `assert!(!having_fun())`. |
