RFR: 8376234: Migrate java/lang/constant tests away from TestNG
Roger Riggs
rriggs at openjdk.org
Thu Feb 12 14:30:25 UTC 2026
On Fri, 23 Jan 2026 22:10:06 GMT, Chen Liang <liach at openjdk.org> wrote:
> Convert all TestNG tests in java/lang/constant to JUnit tests.
Looks good.
test/jdk/java/lang/constant/CondyDescTest.java line 211:
> 209: assertFalse(clazz.isAssignableFrom(nonCanonical.getClass()));
> 210: assertEquals(canonical, prototype);
> 211: assertEquals(prototype, canonical);
The tool swapped the lines unnecessarily.
And a couple more cases below.
test/jdk/java/lang/constant/MethodHandleDescTest.java line 113:
> 111: testMethodHandleDesc(r);
> 112:
> 113: assertMHEquals(mh, r.resolveConstantDesc(LOOKUP));
Swapping the arguments isn't necessary since assertMHEquals is reflexive.
The method arguments don't follow the junit expected/actual ordering.
-------------
Marked as reviewed by rriggs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29396#pullrequestreview-3790970821
PR Review Comment: https://git.openjdk.org/jdk/pull/29396#discussion_r2798847481
PR Review Comment: https://git.openjdk.org/jdk/pull/29396#discussion_r2799051841
More information about the core-libs-dev
mailing list