mihaibudiu commented on code in PR #4321:
URL: https://github.com/apache/calcite/pull/4321#discussion_r2050983076


##########
testkit/src/main/java/org/apache/calcite/test/DiffRepository.java:
##########
@@ -641,13 +652,47 @@ private static ImmutableSortedSet<String> 
validate(Element root) {
         if (testCases.put(name, testCase) != null) {
           throw new RuntimeException("TestCase '" + name + "' is duplicate");
         }
-        if (previousName != null
-            && previousName.compareTo(name) > 0) {
-          outOfOrderNames.add(name);
-        }
-        previousName = name;
       }
     }
+    return testCases;
+  }
+
+  /** Validates if there is methods that only exists in XML.

Review Comment:
   This should also be "Checks"
   If there "are methods that only exist in XML"



##########
testkit/src/test/java/org/apache/calcite/test/DiffRepositoryTest.java:
##########
@@ -44,4 +44,17 @@ public class DiffRepositoryTest {
     }
     assertThat("First assertion must always fail", assertPassed, is(false));
   }
+
+  @Test void testMethodOnlyExistsInXml() {
+    boolean assertPassed = false;
+    DiffRepository r = DiffRepository.lookup(DiffRepositoryTest.class);
+    final String actual = "testMethodOnlyExistsInXml1";
+    try {
+      r.checkActualAndReferenceFiles();
+      assertPassed = true;
+    } catch (IllegalArgumentException e) {
+      assertThat(e.getMessage(), containsString(actual));
+    }
+    assertThat("First assertion must always fail", assertPassed, is(false));

Review Comment:
   I think "unreachable" is a better description



-- 
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]

Reply via email to