Skip to content

Commit 52de5f4

Browse files
committed
test store.get with start argument
1 parent 933f58b commit 52de5f4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/test/java/dev/zarr/zarrjava/store/StoreTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public void testGetSize() {
8383
public void testGetWithStartEnd() {
8484
StoreHandle storeHandle = storeHandleWithData();
8585
long size = storeHandle.getSize();
86-
System.out.println("Store size: " + size);
8786
if (size < 20) {
8887
Assertions.fail("Store size is too small to test get with start and end");
8988
}
@@ -97,6 +96,13 @@ public void testGetWithStartEnd() {
9796
byte[] actualBytes = new byte[10];
9897
buffer.get(actualBytes, 0, 10);
9998
Assertions.assertArrayEquals(expectedBytes, actualBytes);
99+
100+
buffer = storeHandle.read(size-10);
101+
Assertions.assertEquals(10, buffer.remaining());
102+
fullBuffer.position((int)(size-10));
103+
fullBuffer.get(expectedBytes, 0, 10);
104+
buffer.get(actualBytes, 0, 10);
105+
Assertions.assertArrayEquals(expectedBytes, actualBytes);
100106
}
101107

102108
@Test

0 commit comments

Comments
 (0)