RFR: 8295058: test/langtools/tools/javac 116 tests classes use com.sun.tools.classfile library
Adam Sotona
asotona at openjdk.org
Tue Aug 1 14:20:58 UTC 2023
On Thu, 13 Jul 2023 17:29:44 GMT, Qing Xiao <duke at openjdk.org> wrote:
> Modified 12 of 226 test/langtools/tools/javac test classes to replace com.sun.tools.classfile library.
This is great amount of work well done.
test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java line 571:
> 569: }
> 570:
> 571: /************ Helper annotations counting methods ******************/
Arn't these test methods duplicated in the ClassfileTestHelper?
test/langtools/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java line 744:
> 742: int visibles;
> 743: int invisibles;
> 744: }
Missing new line at the end
test/langtools/tools/javac/annotations/typeAnnotations/classfile/Scopes.java line 65:
> 63: @Target({ElementType.TYPE_USE})
> 64: @interface UniqueInner { };
> 65: }
missing new line
test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultVerifier.java line 74:
> 72: // need API to return unknown AnnotationValue's length
> 73: // testCase.checkEquals(((BoundAttribute<?>)attr).payloadLen(), 1 + attr.defaultValue().payloadLen(),
> 74: // "attribute_length");
Is there still a problem with casting to BoundAttribute that the test is commented out?
test/langtools/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultVerifier.java line 257:
> 255: // need ev.length() api to check length
> 256: // testCase.checkEquals(((BoundAttribute<?>)attr).payloadLen(), 1 + 2 +
> 257: // (sizeOfTag + ev.length() / ev.values().size()) * ev.values().size(), "attribute_length");
The same as above.
test/langtools/tools/javac/classfiles/attributes/Signature/EnumTest.java line 1:
> 1: /*
This is probably a mistake, I see content of EnumTest replaced with Driver class.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14874#pullrequestreview-1557008889
PR Review Comment: https://git.openjdk.org/jdk/pull/14874#discussion_r1280647722
PR Review Comment: https://git.openjdk.org/jdk/pull/14874#discussion_r1280648492
PR Review Comment: https://git.openjdk.org/jdk/pull/14874#discussion_r1280655171
PR Review Comment: https://git.openjdk.org/jdk/pull/14874#discussion_r1280683840
PR Review Comment: https://git.openjdk.org/jdk/pull/14874#discussion_r1280684857
PR Review Comment: https://git.openjdk.org/jdk/pull/14874#discussion_r1280700268
More information about the compiler-dev
mailing list