100-days-of-rust/Week-08/Day-53_Javelin-Parabolic-Throw/day53/tests/examples.rs

20 lines
346 B
Rust
Raw Normal View History

2024-09-16 08:45:03 +00:00
#[cfg(test)]
mod examples {
use day53::javelin_throw;
#[test]
fn example1() {
assert_eq!(javelin_throw(36.7, 45), (34, 137));
}
#[test]
fn example2() {
assert_eq!(javelin_throw(51.3, 20), (16, 172));
}
#[test]
fn example3() {
assert_eq!(javelin_throw(100.1, 89), (511, 36));
}
}