3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-08-10 15:20:53 +00:00

add some more tests

This commit is contained in:
Arpad Borsos 2022-07-09 17:17:14 +02:00
parent 86bae2494f
commit fffd6895b2
No known key found for this signature in database
GPG key ID: FC7BCA77824B3298
12 changed files with 185 additions and 1057 deletions

View file

@ -1,3 +1,17 @@
fn main() {
println!("Hello, world!");
}
fn some_fn(input: bool) -> usize {
if input {
2 + 4
} else {
3.saturating_add(5)
}
}
#[test]
fn some_test() {
assert_eq!(some_fn(true), 6);
assert_eq!(some_fn(false), 8);
}