RFR: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory

Raffaello Giulietti rgiulietti at openjdk.org
Wed Oct 11 10:30:10 UTC 2023


On Tue, 10 Oct 2023 23:21:42 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Change test to use `RandomFactory` instead of `new Random()` and convert it to JUnit 5.

test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal.java line 115:

> 113:         }
> 114: 
> 115:         assertTrue(failures == 0);

Suggestion:

        assertEquals(0, failures);

Gives a better message because it explicitly knows both the expected value (1st arg) and the actual value (2nd arg).
Similarly for other `assertTrue` usages below).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16130#discussion_r1354633701


More information about the core-libs-dev mailing list