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:32:55 GMT, Christian Stein <cstein at openjdk.org> wrote:

>> Here it is input and then expected values, not really actual value and the expected value. So the inconsistency is not that big.
>> 
>> I am afraid that if we move expected to front here, there will be a lot of readability lost. For me, at least. Currently (with TestNG), the code is consistent and readable. If, in order to convert to JUnit, I would have to sacrifice readability to keep consistency, then I guess I would start to question if the conversion has a point. I.e. the conversion would need to bring a benefit big enough to compensate for the loss of readability here.
>
> In conversions like this we should not touch test-local code unrelated to the framework migration. Just keep those helpers "as-is" in order to keep the touched surface of PR small(er) and on-topic.

I think people are thinking I was suggesting a change in this PR, I was not. I was simply pointing out the consistency issue which now arises.

If I had to say what I'd like to see in tests, it would be to switch to using the Truth API everywhere (which is, realistically, not going to happen) because it is both more readable in the code *and* gives much much better error messages (and it's compatible with JUnit).

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

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


More information about the compiler-dev mailing list