diff options
| -rw-r--r-- | src/about_variables.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/about_variables.rs b/src/about_variables.rs index 9e64904..ede3479 100644 --- a/src/about_variables.rs +++ b/src/about_variables.rs @@ -1,4 +1,3 @@ -#[allow(dead_code)] fn guess_this () -> i32 { let one = 5; let two = 7; @@ -7,14 +6,24 @@ fn guess_this () -> i32 { return result; } +fn simple () -> &'static str { + let hello = "Hello World!"; + return hello; +} + mod tests { use super::*; + pub fn test_simple () { + verify!("Hello World!", simple(), "Simple example"); + } + pub fn test_complicated () { verify!(1, guess_this(), "Complicated example"); } } pub fn exec () { + tests::test_simple(); tests::test_complicated(); } |
