diff options
| author | Stig Johan Berggren <stigjb@gmail.com> | 2020-02-25 14:13:10 +0100 |
|---|---|---|
| committer | Stig Johan Berggren <stigjb@gmail.com> | 2020-02-25 14:13:10 +0100 |
| commit | 8b971ffab6079a706ac925f5917f987932b55c07 (patch) | |
| tree | 188c7d31ae99424aa41270eca087bcdf48111657 /exercises | |
| parent | ec51cdb22966b6c68cb806b181d1d3bf2ba73159 (diff) | |
Enable test for exercise test4
Diffstat (limited to 'exercises')
| -rw-r--r-- | exercises/test4.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/exercises/test4.rs b/exercises/test4.rs index c543a64..f3875cf 100644 --- a/exercises/test4.rs +++ b/exercises/test4.rs @@ -7,8 +7,13 @@ // I AM NOT DONE -fn main() { - if my_macro!("world!") != "Hello world!" { - panic!("Oh no! Wrong output!"); +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_my_macro() { + assert_eq!(my_macro!("world!"), "Hello world!"); } } + |
