RFR: 8365776: Convert JShell tests to use JUnit instead of TestNG

David Beaumont duke at openjdk.org
Fri Sep 5 10:03:34 UTC 2025


On Tue, 19 Aug 2025 15:07:53 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> test/langtools/jdk/jshell/ComputeFQNsTest.java line 132:
>> 
>>> 130:         QualifiedNames candidates = getAnalysis().listQualifiedNames(code, code.length());
>>> 131: 
>>> 132:         assertEquals(Arrays.asList(), candidates.getNames(), "Input: " + code + ", candidates=" + candidates.getNames());
>> 
>> This is where my itch for test readability wants to see `List.of()` etc, I know it's not much, but every little helps.
>> Of course, in Truth this is even nicer as:
>> 
>> assertThat(candidates.getNames()).withMessage("Input: " + code).isEmpty();
>
> I think I am relatively opposed to mix different types of changes, esp. if there are biggish. Also, automatic `Arrays.asList()` -> `List.of()` is somewhat troublesome, as the semantics is different.

I was in no way suggesting that this sort of thing be changed in this PR, simply making a comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26841#discussion_r2288539425


More information about the compiler-dev mailing list