Merge pull request #276 from stigjb-forks/testing-test4
Enable test for exercise test4
This commit is contained in:
commit
358fb473cd
@ -7,8 +7,17 @@
|
|||||||
|
|
||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
fn main() {
|
#[cfg(test)]
|
||||||
if my_macro!("world!") != "Hello world!" {
|
mod tests {
|
||||||
panic!("Oh no! Wrong output!");
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_my_macro_world() {
|
||||||
|
assert_eq!(my_macro!("world!"), "Hello world!");
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_my_macro_goodbye() {
|
||||||
|
assert_eq!(my_macro!("goodbye!"), "Hello goodbye!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ The way macros are written, it wants to see something between each
|
|||||||
[[exercises]]
|
[[exercises]]
|
||||||
name = "test4"
|
name = "test4"
|
||||||
path = "exercises/test4.rs"
|
path = "exercises/test4.rs"
|
||||||
mode = "compile"
|
mode = "test"
|
||||||
hint = "No hints this time ;)"
|
hint = "No hints this time ;)"
|
||||||
|
|
||||||
# MOVE SEMANTICS
|
# MOVE SEMANTICS
|
||||||
|
Reference in New Issue
Block a user