On Thu, 22 Feb 2024 16:01:19 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
>> Currently assertEquals has in the failure case sometimes confusing output >> like : >> >> java.lang.RuntimeException: VM output should contain exactly one RTM locking >> statistics entry for method >> compiler.rtm.locking.TestRTMTotalCountIncrRate$Test:🔒 expected 0 to equal 1 >> at jdk.test.lib.Asserts.fail(Asserts.java:634) >> at jdk.test.lib.Asserts.assertEquals(Asserts.java:205) >> >> (I don't think we really expected that for some reason 0 equals 1) >> This should be improved. > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revision: > > assertEquals adjust output Hello David, the updated text that I proposed to Matthias, of the form "expected: ... but was: ..." was borrowed from what junit5 reports for such assertion failures https://github.com/junit-team/junit5/blob/main/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionFailureBuilder.java#L174 ------------- PR Comment: https://git.openjdk.org/jdk/pull/17952#issuecomment-1963436885