exowos/subject_source/tests/vec_access.rs
2025-03-11 22:32:21 +01:00

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));
}