RFR: 8340493: Fix some Asserts failure messages [v3]
Weijun Wang
weijun at openjdk.org
Thu Dec 19 12:33:42 UTC 2024
On Thu, 19 Dec 2024 10:17:28 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> test/lib/jdk/test/lib/Asserts.java line 256:
>>
>>> 254: * @see #assertNotEqualsByteArray(byte[], byte[], String)
>>> 255: */
>>> 256: public static void assertNotEqualsByteArray(byte[] unexpected, byte[] actual) {
>>
>> For inequality, would "expectedNot" or "targetValue" better than "unexpected"? Or is there similar wording used elsewhere that you are basing this on? This method can be replaced with `!assertEqualsByteArray(...)` and does not seem that useful to me. If you use "targetValue", this is more neutral name for arguments. Method name indicates whether the check is for equality or inequality.
>
> FWIW, JUnit uses `unexpected`, testNG uses `expected` in assertNotEquals.
Thanks Dan. `unexpected` seems a simpler and straightforward name for me.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21101#discussion_r1891853037
More information about the core-libs-dev
mailing list