Skip to content

Commit

Permalink
minor refactors in test
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Aug 18, 2024
1 parent bf8fbf6 commit 25c985b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/test/java/com/esaulpaugh/headlong/abi/EncodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private static void testFormat(boolean func, java.util.function.Function<byte[],
Assertions.assertTrue(formatted.contains(labeled));
}
} else {
assertThrown(ILLEGAL, "expected length mod 32 == 0, found: ", () -> format.apply(x));
assertThrown(ILLEGAL, "expected length mod 32 == 0, found: ", () -> System.out.println(format.apply(x)));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/esaulpaugh/headlong/rlp/RLPStreamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void testStreamEasy() throws Throwable {
TestUtils.assertThrown(IllegalArgumentException.class, "len is out of range: 10", () -> encodings.stream()
.map(RLP_STRICT::wrapItem)
.mapToInt(RLPItem::asInt)
.sum());
.forEach(System.out::println));
}

@Test
Expand All @@ -186,7 +186,7 @@ public void testUnrecoverable() throws Throwable {
pos.write(0x81);
pos.write(0x00);
Iterator<RLPItem> iter = stream.iterator();
TestUtils.assertThrown(IllegalArgumentException.class, "invalid rlp for single byte @ 0", iter::hasNext);
TestUtils.assertThrown(IllegalArgumentException.class, "invalid rlp for single byte @ 0", () -> System.out.println(iter.hasNext()));
try (Stream<RLPItem> stream2 = RLPDecoder.stream(RLP_STRICT.sequenceIterator(pis))) {
pos.write(0xf8);
pos.write(0x37);
Expand All @@ -195,7 +195,7 @@ public void testUnrecoverable() throws Throwable {
TestUtils.assertThrown(
IllegalArgumentException.class,
"long element data length must be 56 or greater; found: 55 for element @ 0",
iter2::hasNext
() -> System.out.println(iter2.hasNext())
);
}
}
Expand Down

0 comments on commit 25c985b

Please sign in to comment.