InnerClassesInInnerEnumTest.java revision 3222:94cfc50c1b8a
1272343Sngie/*
2272343Sngie * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3272343Sngie * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4272343Sngie *
5272343Sngie * This code is free software; you can redistribute it and/or modify it
6272343Sngie * under the terms of the GNU General Public License version 2 only, as
7272343Sngie * published by the Free Software Foundation.
8272343Sngie *
9272343Sngie * This code is distributed in the hope that it will be useful, but WITHOUT
10272343Sngie * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11272343Sngie * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12272343Sngie * version 2 for more details (a copy is included in the LICENSE file that
13272343Sngie * accompanied this code).
14272343Sngie *
15272343Sngie * You should have received a copy of the GNU General Public License version
16272343Sngie * 2 along with this work; if not, write to the Free Software Foundation,
17272343Sngie * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18272343Sngie *
19272343Sngie * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20272343Sngie * or visit www.oracle.com if you need additional information or have any
21272343Sngie * questions.
22272343Sngie */
23272343Sngie
24272343Sngie/*
25272343Sngie * @test
26272343Sngie * @bug 8034854 8042251
27272343Sngie * @summary Testing InnerClasses_attribute of inner classes in inner enum.
28272343Sngie * @library /tools/lib /tools/javac/lib ../lib
29272343Sngie * @modules jdk.compiler/com.sun.tools.javac.api
30272343Sngie *          jdk.compiler/com.sun.tools.javac.file
31272343Sngie *          jdk.compiler/com.sun.tools.javac.main
32272343Sngie *          jdk.jdeps/com.sun.tools.classfile
33272343Sngie * @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
34272343Sngie * @run main InnerClassesInInnerEnumTest
35272343Sngie */
36272343Sngie
37272343Sngiepublic class InnerClassesInInnerEnumTest extends InnerClassesInInnerClassTestBase {
38272343Sngie
39272343Sngie    public static void main(String[] args) throws TestFailedException {
40272343Sngie        InnerClassesTestBase test = new InnerClassesInInnerEnumTest();
41272343Sngie        test.test("InnerClassesSrc$Inner", "Inner", "1");
42272343Sngie    }
43272343Sngie
44272343Sngie    @Override
45272343Sngie    public void setProperties() {
46272343Sngie        setOuterOtherModifiers(Modifier.EMPTY, Modifier.STATIC);
47272343Sngie        setOuterClassType(ClassType.ENUM);
48272343Sngie        setInnerClassType(ClassType.CLASS);
49272343Sngie        setHasSyntheticClass(true);
50272343Sngie        setPrefix("Inner {;");
51272343Sngie        setSuffix("}");
52272343Sngie    }
53272343Sngie}
54272343Sngie