RFR: 8340493: Fix some Asserts failure messages [v2]

Weijun Wang weijun at openjdk.org
Wed Dec 18 14:00:54 UTC 2024


On Wed, 18 Dec 2024 02:37:05 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> test/lib/jdk/test/lib/Asserts.java line 244:
>> 
>>> 242:      * @see #assertEqualsByteArray(byte[], byte[], String)
>>> 243:      */
>>> 244:     public static void assertEqualsByteArray(byte[] expected, byte[] actual) {
>> 
>> Based on [ML_KEM_Test.java](https://java.se.oracle.com/source/xref/jdk-jdk/jdk-open/test/jdk/sun/security/provider/acvp/ML_KEM_Test.java) and [ML_DSA_Test.java](https://java.se.oracle.com/source/xref/jdk-jdk/jdk-open/test/jdk/sun/security/provider/acvp/ML_DSA_Test.java), it looks like the first argument should be actual and the 2nd argument is expected.
>
> Also, it's not about "the same byte array", but more like "the same bytes" or have equal values, right? This applies to other methods as well.

Correct, I'll fix.

As for its usages (in `ML_KEM_Test.java` etc), I'll be happy to fix them. In fact, I first noticed those inconsistency and then decided to make the changes here. Would you prefer them to be fixed in this PR?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21101#discussion_r1890281382


More information about the core-libs-dev mailing list