feat: add tests

This commit is contained in:
2024-01-07 23:51:29 +08:00
parent 7ec4c4a526
commit 97baed2e2a
11 changed files with 107 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
fn add(a: i32, b: i32) -> i32 {
a + b
}
#[test]
fn test_01() {
assert_eq!(2, add(1, 1));
assert_eq!(3, add(1, 2));
}
fn main() {}