[foreign-memaccess+abi] RFR: Improve test coverage in the jdk.internal.layout package
Per Minborg
pminborg at openjdk.org
Tue Feb 14 12:37:08 UTC 2023
On Mon, 13 Feb 2023 16:31:25 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> This PR adds some tests and minor code refactoring.
>
> test/jdk/java/foreign/TestLayouts.java line 80:
>
>> 78: assertFalse(ADDRESS.equals(differentTargetLayout));
>> 79: var equalButNotSame = ADDRESS.withTargetLayout(JAVA_INT).withTargetLayout(JAVA_CHAR);
>> 80: assertFalse(ADDRESS.equals(equalButNotSame));
>
> I don't see what this extra code is testing that wasn't already tested by the lines above.
>
> Was this intended as `assertTrue(differentTargetLayout .equals(equalButNotSame));` ?
The idea was to create a layout that is equal but not the same so to touch `OfAddress::equals` at the end where the layouts are compared.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/790
More information about the panama-dev
mailing list