mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 14:02:22 -05:00
update docs
This commit is contained in:
parent
4eca18050f
commit
54f58cd726
1 changed files with 3 additions and 3 deletions
|
@ -30,10 +30,10 @@ pub fn exec() {
|
||||||
Each exercise file is supposed to have one `exec` function which gets called by the `main.rs` file.
|
Each exercise file is supposed to have one `exec` function which gets called by the `main.rs` file.
|
||||||
This function, in turn, calls all individual test functions.
|
This function, in turn, calls all individual test functions.
|
||||||
|
|
||||||
The tests themselves can generally be structured in whatever way is desired. Two macros are provided
|
The tests themselves can generally be structured in whatever way is desired, there doesn't have to be a "tests" module, for example. Two macros are provided
|
||||||
for convenience. The `verify!` macro is essentially a specialized `assert_eq!`, but it doesn't panic
|
for convenience. The `verify` helper function is essentially a specialized `assert_eq!`, but it doesn't panic
|
||||||
if the values mismatch, instead it prints out a helpful error message and keeps going. The
|
if the values mismatch, instead it prints out a helpful error message and keeps going. The
|
||||||
`verify_easy!` macro is designed as a drop-in replacement for the `verify!` macro for if the learner needs help solving the exercise. It prints the expected value, too.
|
`verify_easy` function is designed as a drop-in replacement for the `verify` function for if the learner needs help solving the exercise. It prints the expected value, too.
|
||||||
|
|
||||||
This is roughly what the console output for a simple exercise looks right now:
|
This is roughly what the console output for a simple exercise looks right now:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue