rustlings/exercises/test4.rs
2019-12-25 15:50:04 +00:00

19 lines
324 B
Rust

// test4.rs
// This test covers the sections:
// - Modules
// - Macros
// Write a macro that passes the test! No hints this time, you can do it!
#[macro_export]
macro_rules! my_macro {
($val:expr) => {$val}
}
fn main() {
if my_macro!("world!") != "Hello world!" {
panic!("Oh no! Wrong output!");
}
}