Skip to content

Commit

Permalink
rename method in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Sysolyatin committed Nov 10, 2023
1 parent ecff5f5 commit 80f6bff
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/src/test/java/org/apache/calcite/sql/SqlNodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class SqlNodeTest {
* SqlCall#equalsDeep does not take into account the function quantifier</a>.
*/
@Test void testCountEqualsDeep() throws SqlParseException {
assertThat("count(a)", isDeepEqual("count(a)"));
assertThat("count(distinct a)", isDeepEqual("count(distinct a)"));
assertThat("count(distinct a)", not(isDeepEqual("count(a)")));
assertThat("count(a)", isEqualsDeep("count(a)"));
assertThat("count(distinct a)", isEqualsDeep("count(distinct a)"));
assertThat("count(distinct a)", not(isEqualsDeep("count(a)")));
}

/**
Expand All @@ -70,10 +70,11 @@ class SqlNodeTest {
* structurally equivalent</a>.
*/
@Test void testRowEqualsDeep() throws SqlParseException {
assertThat("CAST(a AS ROW(field INTEGER))", isDeepEqual("CAST(a AS ROW(field INTEGER))"));
assertThat("CAST(a AS ROW(field INTEGER))",
isEqualsDeep("CAST(a AS ROW(field INTEGER))"));
}

private static Matcher<String> isDeepEqual(String sqlExpected) {
private static Matcher<String> isEqualsDeep(String sqlExpected) {
return new CustomTypeSafeMatcher<String>("isDeepEqual") {
@Override protected boolean matchesSafely(String sqlActual) {
try {
Expand Down

0 comments on commit 80f6bff

Please sign in to comment.