RFR: JDK-8326389: [test] improve assertEquals failure output [v3]
Matthias Baesken
mbaesken at openjdk.org
Fri Mar 1 12:48:46 UTC 2024
On Mon, 26 Feb 2024 06:57:49 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Hello David, the updated text that I proposed to Matthias, of the form "expected: ... but was: ..." was borrowed from what junit5
Unfortunately we get now error messages like this
java.lang.RuntimeException: VM output should contain exactly one rtm locking statistics entry for method compiler.testlibrary.rtm.XAbortProvoker::forceAbort expected: 0 but was: 1
It should be ... expected: 1 but was: 0 ; the assertEquals has this interface `assertEquals(Object lhs, Object rhs, String msg)` so we have a left hand (lhs) and a right hand side (rhs) of a comparison but was is expected and what is what we got is not defined .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17952#issuecomment-1973131407
More information about the core-libs-dev
mailing list