12 lines
240 B
Rust
12 lines
240 B
Rust
use subject_source::vec::access;
|
|
|
|
#[test]
|
|
pub fn add_last_two_not_enough() {
|
|
assert_eq!(access::add_last_two(&[1.0]), None);
|
|
}
|
|
|
|
#[test]
|
|
pub fn add_last_two_enough() {
|
|
assert_eq!(access::add_last_two(&[1.0, 2.0, 3.0]), Some(5.0));
|
|
}
|