RFR: 8303582: Reduce duplication in test code (mainline)

Jorn Vernee jvernee at openjdk.org
Fri Mar 3 19:32:08 UTC 2023


On Fri, 3 Mar 2023 15:08:01 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Port of: https://github.com/openjdk/panama-foreign/pull/804 which reduces duplication in the test code by switching test value generation over to a common method in `NativeTestHelper`.

src/java.base/share/classes/jdk/internal/foreign/Utils.java line 224:

> 222:      * @param elements the structs' fields
> 223:      */
> 224:     public static StructLayout computePaddedStructLayout(MemoryLayout... elements) {

Note that this method is in `Utils` since we will also need it later for the fallback linker.

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

PR: https://git.openjdk.org/jdk/pull/12856


More information about the core-libs-dev mailing list