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!"); } } + diff --git a/info.toml b/info.toml index 2e6b0b4..4b89029 100644 --- a/info.toml +++ b/info.toml @@ -369,7 +369,7 @@ The way macros are written, it wants to see something between each [[exercises]] name = "test4" path = "exercises/test4.rs" -mode = "compile" +mode = "test" hint = "No hints this time ;)" # MOVE SEMANTICS