RFR(S): 8064953: Asserts.assert* should print values
tatiana.pivovarova at oracle.com
Fri Nov 28 11:27:33 UTC 2014
Hi David, Staffan,
Thank you for your review!
Staffan, you are right "(assert failed: ...)" is more readable. I made
this changes in code
Here is the new webrev:
On 11/28/2014 09:44 AM, Staffan Larsen wrote:
> This looks good but can lead to some strange messages when paired with the messages that are in use for some of the existing assert calls.
> For example this usage:
> Asserts.assertEQ(tests.length, results.length, "[TESTBUG] tests.length != results.length”);
> will now lead to a message looking like this:
> [TESTBUG] tests.length != results.length Expected that 1 == 2
> Could we instead change the output to look more like this?:
> [TESTBUG] tests.length != results.length (assert failed: 1 == 2)
>> On 27 nov 2014, at 16:53, Tatiana Pivovarova <tatiana.pivovarova at oracle.com> wrote:
>> please review this enhancement patch.
>> bugid: https://bugs.openjdk.java.net/browse/JDK-8064953
>> webrev: http://cr.openjdk.java.net/~iignatyev/tpivovarova/8064953/webrev.00/
>> 'assert*' methods which get message as 'msg' parameter don't print compared parameter's values. These values must be printed in any case: with or without 'msg' parameter.
>> This enhancement force 'assert*' methods to print compared values.
>> Testing: Manual. I run all tests in hotspot/test/* on the latest jdk.
More information about the hotspot-compiler-dev