RFR: 8304360: Test to ensure ConstantDescs fields work

Jorn Vernee jvernee at openjdk.org
Thu Mar 16 18:17:36 UTC 2023


On Thu, 16 Mar 2023 16:58:53 GMT, Chen Liang <liach at openjdk.org> wrote:

> https://github.com/openjdk/jdk/pull/13033#issuecomment-1470857327
> 
> Add a test to validate that all constants in ConstantDescs can be resolved with a minimally-trusted lookup, and select constants represent the objects they claim to be.

test/jdk/java/lang/constant/ConstantDescsTest.java line 65:

> 63:      */
> 64:     @Test
> 65:     public void validateAllFields() throws ReflectiveOperationException {

It might be nice to use a `@DataProvider` to feed in the different ConstantDescs and expected resolved values. Saves on some of the duplication.

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

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


More information about the core-libs-dev mailing list