Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RegularExpressionTestUtil for testing regexes #1041

Merged
merged 11 commits into from
Jan 24, 2025
Prev Previous commit
Next Next commit
Remove conditional logic for logging and test failure.
Co-authored-by: drivenflywheel <dan@drivenflywheel.com>
  • Loading branch information
ldhardy and drivenflywheel authored Jan 8, 2025
commit 45e8a0642660af675b60684c12f51c0efffe1b09
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ public static void testRegexPattern(Pattern patternUnderTest, @Nullable List<Str
fineGrainTestCount++;
}
}
if (fineGrainTestCount == 0) {
fail("Didn't test anything.");
} else {
logger.debug("Successfully asserted {} regex test cases.", fineGrainTestCount);
}
assertTrue(fineGrainTestCount > 0, "No regex assertions performed.");
logger.debug("Successfully asserted {} regex test cases.", fineGrainTestCount);
}


Expand Down
Loading