mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-11 14:45:31 +00:00
test filter coords
This commit is contained in:
15
src/frame.rs
15
src/frame.rs
@@ -97,4 +97,19 @@ mod tests {
|
||||
let frame = Frame::with_len(10);
|
||||
assert_eq!(frame.len(), 10);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_filter_coords() {
|
||||
let mut frame = Frame {
|
||||
step: 0,
|
||||
time: 0.0,
|
||||
box_vector: [[0.0; 3]; 3],
|
||||
coords: vec![[0.0; 3], [1.0; 3], [2.0; 3]]
|
||||
};
|
||||
|
||||
frame.filter_coords(&[1]);
|
||||
for i in 0..3 {
|
||||
assert_approx_eq!(frame.coords[0][i], 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user