FrankChen021 commented on code in PR #5281: URL: https://github.com/apache/calcite/pull/5281#discussion_r4396584879
########## core/src/test/java/org/apache/calcite/sql/type/SqlTypeFactoryTest.java: ########## @@ -36,16 +40,61 @@ import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasToString; +import static org.junit.jupiter.api.Assertions.assertEquals; Review Comment: ```java assertThat(coercible.getCollation(), sameInstance(SqlCollation.COERCIBLE)) ``` we can use this assert, but the problem is the failure message didn't show the coercibility(which was requested by your above comment). To make the exception more intuitive, we still need to assert the coercibility like below: ```java assertThat(requireNonNull(coercible.getCollation()).getCoercibility(), is(SqlCollation.Coercibility.COERCIBLE)); assertThat(coercible.getCollation(), sameInstance(SqlCollation.COERCIBLE)); ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
