@@ -220,6 +220,11 @@ pub(crate) fn slice_device_patches(
220220
221221#[ cfg( test) ]
222222mod tests {
223+ use std:: ops:: Range ;
224+
225+ use vortex:: array:: ArrayRef ;
226+ use vortex:: array:: assert_arrays_eq;
227+ use vortex:: array:: buffer:: BufferHandle ;
223228 use vortex:: array:: validity:: Validity :: NonNullable ;
224229 use vortex:: buffer:: Buffer ;
225230 use vortex:: session:: VortexSession ;
@@ -246,7 +251,6 @@ mod tests {
246251 values. into_array ( ) ,
247252 Some ( chunk_offsets. into_array ( ) ) ,
248253 ) ?;
249-
250254 assert ! ( patches. chunk_offsets( ) . is_some( ) ) ;
251255 assert_eq ! ( patches. chunk_offset_at( 0 ) ?, 0 ) ;
252256 assert_eq ! ( patches. chunk_offset_at( 1 ) ?, 2 ) ;
@@ -266,7 +270,7 @@ mod tests {
266270 #[ case:: tail_chunk( 4500 ..5000 , 4500 , vec![ 4 , 5 ] ) ]
267271 #[ crate :: test]
268272 async fn test_slice_device_patches (
269- #[ case] range : std :: ops :: Range < usize > ,
273+ #[ case] range : Range < usize > ,
270274 #[ case] expected_offset : usize ,
271275 #[ case] expected_chunk_offsets : Vec < u32 > ,
272276 ) -> VortexResult < ( ) > {
@@ -311,8 +315,8 @@ mod tests {
311315 ) ]
312316 #[ crate :: test]
313317 async fn test_slice_device_patches_chunk_offset_widths (
314- #[ case] chunk_offsets : vortex_array :: ArrayRef ,
315- #[ case] expected : vortex :: array :: ArrayRef ,
318+ #[ case] chunk_offsets : ArrayRef ,
319+ #[ case] expected : ArrayRef ,
316320 ) -> VortexResult < ( ) > {
317321 let mut cuda_ctx = CudaSession :: create_execution_ctx ( & VortexSession :: empty ( ) ) ?;
318322 let indices = PrimitiveArray :: from_iter ( [ 100u32 , 1100 , 2100 , 3100 , 4100 ] ) ;
@@ -329,14 +333,12 @@ mod tests {
329333 slice_device_patches ( & patches, 1024 ..3000 , & mut device_patches) ;
330334
331335 let actual = PrimitiveArray :: from_buffer_handle (
332- vortex:: array:: buffer:: BufferHandle :: new_host (
333- device_patches. chunk_offsets . to_host ( ) . await ,
334- ) ,
336+ BufferHandle :: new_host ( device_patches. chunk_offsets . to_host ( ) . await ) ,
335337 device_patches. chunk_offset_ptype ,
336338 NonNullable ,
337339 )
338340 . into_array ( ) ;
339- vortex :: array :: assert_arrays_eq!( expected, actual) ;
341+ assert_arrays_eq ! ( expected, actual) ;
340342 assert_eq ! ( device_patches. n_chunks, 3 ) ;
341343 assert_eq ! ( device_patches. offset, 1024 ) ;
342344 assert_eq ! ( device_patches. offset_within_chunk, 0 ) ;
0 commit comments