Huge chunks: selection tests with fill values, LZ4 over 256 MiB, wasm32 check
A selection of a chunked dataset with a fill value is compared with the full read in every index, through a map and through positioned reads. An LZ4 chunk larger than 256 MiB is bounded by the chunk size, not refused. The wasm package test reads the 4 GiB-chunk fixture and gets a clean error in every index. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
@@ -2263,7 +2263,7 @@ mod tests {
|
||||
for i in 0..n {
|
||||
let (offsets, chunk) = extract_chunk(&data, &shape, &chunks, 2, i);
|
||||
assert_eq!(chunk.len(), 2 * 3 * 2 * 2);
|
||||
for (e, pair) in chunk.chunks_exact(2).enumerate() {
|
||||
for (e, pair) in chunk.as_chunks::<2>().0.iter().enumerate() {
|
||||
let c = [e / 6, (e / 2) % 3, e % 2];
|
||||
let g: Vec<u64> = (0..3).map(|d| offsets[d] + c[d] as u64).collect();
|
||||
let expect = if (0..3).all(|d| g[d] < shape[d]) {
|
||||
@@ -2272,7 +2272,7 @@ mod tests {
|
||||
} else {
|
||||
[0, 0]
|
||||
};
|
||||
assert_eq!(pair, expect, "chunk {i} element {e}");
|
||||
assert_eq!(*pair, expect, "chunk {i} element {e}");
|
||||
}
|
||||
}
|
||||
// Data shorter than the shape: the missing elements stay zero.
|
||||
|
||||
Reference in New Issue
Block a user