jdk-24/test/langtools/tools/javac/classfiles/attributes/innerclasses
2024-11-15 11:40:15 +00:00
..
InnerAnnotationsInInnerAnnotationTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerAnnotationsInInnerClassTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerAnnotationsInInnerEnumTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerAnnotationsInInnerInterfaceTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesHierarchyTest.java 8331291: java.lang.classfile.Attributes class performs a lot of static initializations 2024-05-24 15:58:34 +00:00
InnerClassesInAnonymousClassTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesIndexTest.java 8331291: java.lang.classfile.Attributes class performs a lot of static initializations 2024-05-24 15:58:34 +00:00
InnerClassesInInnerAnnotationTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesInInnerClassTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesInInnerClassTestBase.java
InnerClassesInInnerEnumTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesInInnerInterfaceTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesInLocalClassTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerClassesTestBase.java 8343881: java.lang.classfile.Attribute attributeName() method should return Utf8Entry 2024-11-15 11:40:15 +00:00
InnerEnumInInnerAnnotationTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerEnumInInnerEnumTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerEnumInInnerInterfaceTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerEnumsInInnerClassTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerInterfacesInInnerAnnotationTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerInterfacesInInnerClassTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerInterfacesInInnerEnumTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
InnerInterfacesInInnerInterfaceTest.java 8308753: Class-File API transition to Preview 2023-12-04 07:07:57 +00:00
NoInnerClassesTest.java 8331291: java.lang.classfile.Attributes class performs a lot of static initializations 2024-05-24 15:58:34 +00:00
README.txt
TestCase.java

The description of the tests for the InnerClasses attribute.

InnerClassesTestBase is the base class for tests of inner classes attribute.
Each tests extends the base class.
The scenario of tests:
    1. set possible values of class modifiers, outer/inner class types.
    2. according to set class modifiers, a test generates sources
       and golden data with generateTestCases.
    3. a test loops through all test cases and checks InnerClasses attribute in method test().

Example, possible flags for outer class are Modifier.PRIVATE and Modifier.PUBLIC,
possible flags for inner class are Modifier.EMPTY, outer class type is CLASS
and inner class type is CLASS.
At the second step the test generates two test cases:
  1. public class A {
       public class B {
         class C {}
        }
     }
  2. public class A {
       private class B {
         class C {}
       }
     }

The list of tests.

Test: test if there is not inner class, the InnerClasses attribute
is not generated (NoInnerClasses.java).

Test: inner classes in anonymous class (InnerClassesInAnonymousClassTest.java).
Possible access flags of the inner class: abstract and final.

Test: inner classes in local class (InnerClassesInLocalClassTest.java).
Locations of local class: static and instance initializer, constructor, method, lambda,
default and static methods of interface.

Test: test the outer_class_info_index and inner_name_index of
local and anonymous classes (InnerClassesIndexTest.java).

List of test cases for Inner*InInner*Test:
    * InnerClassesInInnerClassTest
        outer flags: all possible flags
        inner flags: all possible flags
    * InnerClassesInInnerEnumTest
        outer flags: all access flags, abstract
        inner flags: all possible flags
    * InnerClassesInInnerAnnotationTest
        outer flags: all access flags, abstract
        inner flags: all flags, except private and protected
    * InnerClassesInInnerInterfaceTest
        outer flags: all access flags, abstract
        inner flags: all flags, except private and protected

    * InnerEnumsInInnerClassTest
        outer flags: all possible flags
        inner flags: all possible flags
    * InnerEnumsInInnerEnumTest
        outer flags: all possible flags
        inner flags: all possible flags
    * InnerEnumsInInnerAnnotationTest
        outer flags: all access flags, abstract, static
        inner flags: public, static
    * InnerEnumsInInnerInterfaceTest
        outer flags: all access flags, abstract, static
        inner flags: public, static

    * InnerAnnotationInInnerClassTest
        outer flags: all possible flags, except static
        inner flags: all access flags, abstract and static
    * InnerAnnotationInInnerEnumTest
        outer flags: all access flags, static
        inner flags: all access flags, abstract and static
    * InnerAnnotationInInnerAnnotation
        outer flags: all access flags, static and abstract
        inner flags: public, abstract, static
    * InnerAnnotationInInnerInterface
        outer flags: all access flags, static and abstract
        inner flags: public, abstract, static

    * InnerInterfaceInInnerClassTest
        outer flags: all possible flags, except static
        inner flags: all access flags, abstract and static
    * InnerInterfaceInInnerEnumTest
        outer flags: all access flags, static
        inner flags: all access flags, abstract and static
    * InnerInterfaceInInnerAnnotation
        outer flags: all access flags, static and abstract
        inner flags: public, abstract, static
    * InnerInterfaceInInnerInterface
        outer flags: all access flags, static and abstract
        inner flags: public, abstract, static