Skip to content

Commit 8b971ff

Browse files
committed
Enable test for exercise test4
1 parent ec51cdb commit 8b971ff

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

exercises/test4.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77

88
// I AM NOT DONE
99

10-
fn main() {
11-
if my_macro!("world!") != "Hello world!" {
12-
panic!("Oh no! Wrong output!");
10+
#[cfg(test)]
11+
mod tests {
12+
use super::*;
13+
14+
#[test]
15+
fn test_my_macro() {
16+
assert_eq!(my_macro!("world!"), "Hello world!");
1317
}
1418
}
19+

info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ The way macros are written, it wants to see something between each
369369
[[exercises]]
370370
name = "test4"
371371
path = "exercises/test4.rs"
372-
mode = "compile"
372+
mode = "test"
373373
hint = "No hints this time ;)"
374374

375375
# MOVE SEMANTICS

0 commit comments

Comments
 (0)