EnumTest.java revision 2942:08092deced3f
1116742Ssam/*
2116904Ssam * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3178354Ssam * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4116742Ssam *
5116742Ssam * This code is free software; you can redistribute it and/or modify it
6116742Ssam * under the terms of the GNU General Public License version 2 only, as
7116742Ssam * published by the Free Software Foundation.
8116742Ssam *
9116742Ssam * This code is distributed in the hope that it will be useful, but WITHOUT
10116904Ssam * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11116904Ssam * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12116904Ssam * version 2 for more details (a copy is included in the LICENSE file that
13116904Ssam * accompanied this code).
14116742Ssam *
15116904Ssam * You should have received a copy of the GNU General Public License version
16116904Ssam * 2 along with this work; if not, write to the Free Software Foundation,
17116904Ssam * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18116904Ssam *
19116904Ssam * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20116904Ssam * or visit www.oracle.com if you need additional information or have any
21116904Ssam * questions.
22116904Ssam */
23116904Ssam
24116904Ssam/*
25116742Ssam * @test
26116742Ssam * @bug 8049238
27116742Ssam * @summary Checks Signature attribute for enum.
28116742Ssam * @library /tools/lib /tools/javac/lib ../lib
29116742Ssam * @modules jdk.jdeps/com.sun.tools.classfile
30116742Ssam *          jdk.compiler/com.sun.tools.javac.api
31116742Ssam *          jdk.compiler/com.sun.tools.javac.file
32116742Ssam *          jdk.compiler/com.sun.tools.javac.main
33178354Ssam * @build TestBase TestResult InMemoryFileManager ToolBox
34116742Ssam * @build EnumTest Driver ExpectedSignature ExpectedSignatureContainer
35116742Ssam * @run main Driver EnumTest
36116742Ssam */
37116742Ssam
38138568Ssam@ExpectedSignature(descriptor = "EnumTest", signature = "Ljava/lang/Enum<LEnumTest;>;")
39116742Ssampublic enum EnumTest {;
40116742Ssam    // see 8026480
41116742Ssam    @ExpectedSignature(descriptor = "<init>(java.lang.String, int)", signature = "()V")
42178354Ssam    private EnumTest() {}
43116742Ssam}
44178354Ssam