Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Oct 11, 2023
1 parent c4ecc9f commit 63e2bac
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ private static String padNumber(String number) {

public void testDefinedConstants() throws IllegalAccessException {
Pattern historicalVersion = Pattern.compile("^V_(\\d{1,2})_(\\d{1,2})_(\\d{1,2})$");
Pattern IndexVersion = Pattern.compile("^V_(\\d+)_(\\d{3})_(\\d{3})$");
Set<String> ignore = Set.of("ZERO", "CURRENT", "MINIMUM_COMPATIBLE");

for (java.lang.reflect.Field field : IndexVersion.class.getFields()) {
Expand All @@ -116,15 +115,6 @@ public void testDefinedConstants() throws IllegalAccessException {
idString,
field.get(null).toString()
);
} else if ((matcher = IndexVersion.matcher(field.getName())).matches()) {
String idString = matcher.group(1) + matcher.group(2) + matcher.group(3);
assertEquals(
"Field " + field.getName() + " does not have expected id " + idString,
idString,
field.get(null).toString()
);
} else {
fail("Field " + field.getName() + " does not have expected format");
}
}
}
Expand Down

0 comments on commit 63e2bac

Please sign in to comment.