AnonymousClassTest.java revision 3222:94cfc50c1b8a
1809Sdarcy/*
217253Siignatyev * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3809Sdarcy * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4809Sdarcy *
5809Sdarcy * This code is free software; you can redistribute it and/or modify it
6809Sdarcy * under the terms of the GNU General Public License version 2 only, as
7809Sdarcy * published by the Free Software Foundation.
8809Sdarcy *
9809Sdarcy * This code is distributed in the hope that it will be useful, but WITHOUT
10809Sdarcy * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11809Sdarcy * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12809Sdarcy * version 2 for more details (a copy is included in the LICENSE file that
13809Sdarcy * accompanied this code).
14809Sdarcy *
15809Sdarcy * You should have received a copy of the GNU General Public License version
16809Sdarcy * 2 along with this work; if not, write to the Free Software Foundation,
17809Sdarcy * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18809Sdarcy *
192362Sohair * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202362Sohair * or visit www.oracle.com if you need additional information or have any
212362Sohair * questions.
22809Sdarcy */
23809Sdarcy
24809Sdarcy/*
25809Sdarcy * @test
2617253Siignatyev * @summary sourcefile attribute test for anonymous class.
2717329Siignatyev * @bug 8040129
2811824Sbpb * @library /tools/lib /tools/javac/lib ../lib
2911824Sbpb * @modules jdk.compiler/com.sun.tools.javac.api
3011824Sbpb *          jdk.compiler/com.sun.tools.javac.file
31809Sdarcy *          jdk.compiler/com.sun.tools.javac.main
3211822Sdarcy *          jdk.jdeps/com.sun.tools.classfile
33809Sdarcy * @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
34809Sdarcy * @run main AnonymousClassTest
3517253Siignatyev */
3611893Schegar
37809Sdarcypublic class AnonymousClassTest extends SourceFileTestBase {
38809Sdarcy    public static void main(String[] args) throws Exception {
39809Sdarcy        new AnonymousClassTest().test(new Object(){}.getClass(), "AnonymousClassTest.java");
40809Sdarcy    }
41809Sdarcy}
42809Sdarcy