[foreign-jextract] RFR: Test the Java VaList implementation on every platform [v2]

Jorn Vernee jvernee at openjdk.java.net
Fri Jul 17 10:47:28 UTC 2020


On Fri, 17 Jul 2020 09:12:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> There are some test methods and data providers with "win" in the name. Also, i don't fully understand the distinction
>> between value and reference, i am guessing it's due to the size of the struct that changes the platform specific
>> encoding? I would just use small, large, huge names consistently.
>
> In addition to Paul's comment, the `getInt` test doesn't seem 100% appropriate, since `sumInt` is using `C_INT` but
> `getInt` is using `C_POINTER` - maybe rename to getPointer? Overall the test is very comprehensive and I think it will
> spare us a lot of bugs going forwards, thanks.

I've updated the naming. The previous idea with the win* tests was that each platform would add some tests for it's own
corner cases with it's own name prefix, but it didn't end up working out that way in the end. I've reverted the names
back to struct, bigStruct, hugeStruct, and floatStruct.

(There was also 1 case of a hard-coded platform specific layout being used to determine a segment's size, which I've
swapped for a hard-coded '4', so we at least don't to rely on a platform specific layout)

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

PR: https://git.openjdk.java.net/panama-foreign/pull/247


More information about the panama-dev mailing list