On Wed, 7 Jun 2023 18:51:47 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> test/jdk/java/util/regex/NamedGroupsTests.java line 367:
>> 
>>> 365:         }
>>> 366:         if (!m.group("a").equals("bar")) {
>>> 367:             throw new RuntimeException();
>> 
>> Failures will be easier to resolve if there is some description of the 
>> failure. Having to go back to the stack trace adds extra overhead.
>
> I agree.
> On the one hand, I would prefer to rewrite these tests (the .java file) JUnit 
> tests, but this would require more review work.
> On the other hand, adding descriptions just for this specific, additional 
> test is a bit at odd with the other tests in the file.
> What's the preferred course of action? I have no problems with either way.

I'd add string descriptions to the new exceptions and file an issue to update 
the test later.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14350#discussion_r1222038064

Reply via email to