diff --git a/crates/clawhdf5/tests/v4_chunk_index_selection.rs b/crates/clawhdf5/tests/v4_chunk_index_selection.rs index 97cc7c9..23786bd 100644 --- a/crates/clawhdf5/tests/v4_chunk_index_selection.rs +++ b/crates/clawhdf5/tests/v4_chunk_index_selection.rs @@ -122,7 +122,10 @@ const CASES: &[Case] = &[ /// `(start, stride, count, block)` per dimension; the first few stay below /// half the dataset (bounding-box path), the rest exceed it (full path). -fn selections() -> Vec<([u64; 2], [u64; 2], [u64; 2], [u64; 2])> { +/// `(start, stride, count, block)` of a 2-D hyperslab. +type Hyperslab2 = ([u64; 2], [u64; 2], [u64; 2], [u64; 2]); + +fn selections() -> Vec { vec![ ([0, 0], [1, 1], [3, 23], [1, 1]), // ds[0:3] ([7, 3], [1, 1], [9, 6], [1, 1]), // interior window across chunks @@ -220,8 +223,10 @@ fn partial_hyperslabs_of_every_v4_chunk_index_match_h5py() { .read_selection(&sel) .unwrap_or_else(|e| panic!("{}: read_selection {sel:?} failed: {e}", case.name)); let got: Vec = raw - .chunks_exact(4) - .map(|b| i32::from_le_bytes(b.try_into().unwrap())) + .as_chunks::<4>() + .0 + .iter() + .map(|b| i32::from_le_bytes(*b)) .collect(); assert_eq!(got, want, "{}: selection {sel:?}", case.name); assert_eq!(