RFR: 8375712: Convert java/lang/runtime tests to use JUnit [v2]
Jan Lahoda
jlahoda at openjdk.org
Fri Jan 23 08:11:13 UTC 2026
On Wed, 21 Jan 2026 19:51:56 GMT, Johannes Döbler <duke at openjdk.org> wrote:
>> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase.
>
> test/jdk/java/lang/runtime/ExactnessConversionsSupportTest.java line 64:
>
>> 62: @Test
>> 63: public void testByte() {
>> 64: assertEquals(true, ExactConversionsSupport.isIntToByteExact((byte) (Byte.MAX_VALUE)));
>
> could be shortened to assertTrue(Exact...)``
I took a look at the test, and it seems to me it was written like this intentionally, and that it makes it more obvious what is happening here. This is not a simple assert that something worked (or did not work). This asserts that the return value is exactly this. There's no real difference, of course, but the intent is slightly different.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29350#discussion_r2720058203
More information about the core-libs-dev
mailing list