# --- zarrs_get_subset: Rust read path tests --- test_that("zarrs retrieves 1D float64 array", { skip_if(!.pizzarr_env$zarrs_available, "zarrs backend not available") d <- tempfile("zarrs_ret_1d_") z <- zarr_create(store = d, shape = 10L, chunks = 5L, dtype = " dim_sel=3 (0-based) -> range [3, 4) int_di <- IntDimIndexer$new(3L, 10L, 5L) slice_di <- SliceDimIndexer$new(slice(5L, 15L), 20L, 10L) idx <- list() idx$dim_indexers <- list(int_di, slice_di) class(idx) <- "BasicIndexer" ranges <- selection_to_ranges(idx) expect_length(ranges, 2) expect_equal(ranges[[1]], c(3L, 4L)) # slice(5L, 15L) is 1-based; SliceDimIndexer stores 0-based start=4, stop=15 expect_equal(ranges[[2]], c(4L, 15L)) }) test_that("zarrs and R-native read produce identical results", { skip_if(!.pizzarr_env$zarrs_available, "zarrs backend not available") d <- tempfile("zarrs_compare_") z <- zarr_create(store = d, shape = c(10L, 8L), chunks = c(5L, 4L), dtype = "