Skip to content

Commit

Permalink
Enable test for exercise test4
Browse files Browse the repository at this point in the history
  • Loading branch information
Stigjb committed Feb 25, 2020
1 parent ec51cdb commit 8b971ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions exercises/test4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}
}

2 changes: 1 addition & 1 deletion info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b971ff

Please sign in to comment.