blob: ab2f14365621e32584f248f6ad135e509c5caa7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
fn guess_this() -> i32 {
let one = 5;
let two = 7;
let three = 3;
let result = (one + two) / three;
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();
}
|