RFR: JDK-8317635: Improve GetClassFields test to verify correctness of field order
Chris Plummer
cjplummer at openjdk.org
Thu Oct 12 01:40:24 UTC 2023
On Wed, 11 Oct 2023 00:39:23 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> All test cases in getclfld007 had 1 (or 0) field in test classes/interfaces.
> The change adds several fields in one of the test classes to verify order of the returned fields (as described by GetClassFields spec).
> Additionally added "printdump" argument to the test agent to make the test more verbose.
test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007/TestDescription.java line 36:
> 34: * The test checks if the function returns the expected list of fields:
> 35: * - the list contains only directly declared (not inherited) fields;
> 36: * - fields are returned in the order they occur in the class file.
Is the order of the fields in the class file guaranteed to be the same as the declaration order?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16131#discussion_r1355944841
More information about the serviceability-dev
mailing list