mirror of https://github.com/sunface/rust-course
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
430 B
24 lines
430 B
// quiz4.rs
|
|
// This quiz covers the sections:
|
|
// - Modules
|
|
// - Macros
|
|
|
|
// Write a macro that passes the quiz! No hints this time, you can do it!
|
|
|
|
// I AM NOT DONE
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
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!");
|
|
}
|
|
}
|