Enable test for exercise test4

This commit is contained in:
Stig Johan Berggren 2020-02-25 14:13:10 +01:00
parent ec51cdb229
commit 8b971ffab6
No known key found for this signature in database
GPG Key ID: 2B80D833E53D674A
2 changed files with 9 additions and 4 deletions

View File

@ -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!");
}
}

View File

@ -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