Skip to content

Commit 5e8359a

Browse files
authored
add test
1 parent b2d7b22 commit 5e8359a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
fn main() {
2-
println!("Hello, world!!");
2+
println!("Hello, world!");
3+
}
4+
5+
fn answer() -> u32 {
6+
42
7+
}
8+
9+
#[cfg(test)]
10+
mod tests {
11+
use super::*;
12+
13+
#[test]
14+
fn deep_thought_test() {
15+
assert_eq!(answer(), 42);
16+
}
317
}

0 commit comments

Comments
 (0)