You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: net.lecousin.core/src/test/java/net/lecousin/framework/core/test/io/TestReadable.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -471,16 +471,16 @@ public void testSkipSyncNegativeValue() throws Exception {
471
471
if (skipped != 0)
472
472
thrownewException("Readable is not supposed to be able to skip with a negative value, skipping -10 bytes returned " + skipped + " while 0 was expected.");
473
473
}
474
+
io.readSync(buffer);
475
+
Assert.assertEquals("Invalid byte read after skipSync with negative value", testBuf[testBuf.length / 2 + (int)skipped], b[0]);
474
476
skipped = io.skipSync(-2 * testBuf.length);
475
477
if (ioinstanceofIO.Readable.Seekable) {
476
-
if (skipped != -((testBuf.length + testBuf.length / 2) - 10))
477
-
thrownewException("Skip beyond beginning of IO on Readable.Seekable is supposed to go to the offset 0. Skipping " + (-2 * testBuf.length) + " returned " + skipped + " but expected was " + (-((testBuf.length + testBuf.length / 2) - 10)));
thrownewException("Skip beyond beginning of IO on Readable.Seekable is supposed to go to the offset 0. Skipping " + (-2 * testBuf.length) + " returned " + skipped + " but expected was " + (-((testBuf.length + testBuf.length / 2) - 10 + 1)));
478
480
} else {
479
481
if (skipped != 0)
480
482
thrownewException("Readable is not supposed to be able to skip with a negative value, skipping -10 bytes returned " + skipped + " while 0 was expected.");
481
483
}
482
-
io.readSync(buffer);
483
-
Assert.assertEquals("Invalid byte read after skipSync with negative value", testBuf[testBuf.length / 2 + (int)skipped], b[0]);
Copy file name to clipboardExpand all lines: net.lecousin.core/src/test/java/net/lecousin/framework/core/tests/io/buffered/TestTwoBuffersIODeterminedSizeReadable.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ public TestTwoBuffersIODeterminedSizeReadable(File testFile, byte[] testBuf, int
Copy file name to clipboardExpand all lines: net.lecousin.core/src/test/java/net/lecousin/framework/core/tests/io/buffered/TestTwoBuffersIOReadableBuffered.java
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,9 @@ public TestTwoBuffersIOReadableBuffered(File testFile, byte[] testBuf, int nbBuf
Assert.assertArrayEquals("This is a test".getBytes(StandardCharsets.UTF_8), Base64.decode(" VGhpcyBpcyBhIHRlc3Q=".getBytes(StandardCharsets.UTF_8), 3, 20));
0 commit comments