[foreign-jextract] RFR: 8250222: ConstantsTest is broken

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Jul 23 17:51:56 UTC 2020


This patch fixes ConstantsTest, which seems to be in an inconsistent state, especially when it comes to its test for
missing constants; this test erroneosly looks for fields, not methods, so it always passes (as there are no fields!).

I've rectified the test, but also I've strengthened it, to make sure that we also check the values of the pointer
constants (these were not checked before). I also added a test for an array constant (which should be dropped), and
I've dropped the `UNUSED` constant in `constants_aux.h`, since its use was mostly targeted at some kind of filtering
mechanism that we no longer have.

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

Commit messages:
 - Fix ConstantTest

Changes: https://git.openjdk.java.net/panama-foreign/pull/263/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/263/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8250222
  Stats: 34 lines in 3 files changed: 16 ins; 12 del; 6 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/263.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/263/head:pull/263

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


More information about the panama-dev mailing list