liyafan82 commented on a change in pull request #2287:
URL: https://github.com/apache/calcite/pull/2287#discussion_r535192111
##########
File path: core/src/test/java/org/apache/calcite/util/UtilTest.java
##########
@@ -967,6 +968,17 @@ private String toString(byte[] bytes) {
assertEquals(5825, x);
}
+ /**
+ * Unit test for {@link Pair#zip(java.util.List, java.util.List, boolean)}.
+ */
+ @Test void testPairZipWithStrict() {
+ List<String> strings = Arrays.asList("paul", "george", "john", "ringo");
+ List<Integer> integers = Arrays.asList(1942, 1943);
+ assertThrows(IllegalArgumentException.class, () -> {
+ List<Pair<String, Integer>> zip = Pair.zip(strings, integers, true);
+ });
Review comment:
Maybe we should hold the return value of `assertThrows`, and asserts the
error message is as expected?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]