changeset 3451:185e5bcbc04e

8044864: .out files for enum tests in tools/javac dir - part 1 Reviewed-by: jjg
author sogoel
date Wed, 02 Jul 2014 13:29:58 -0700
parents 86f3208c0070
children 61954520ac34
files test/tools/javac/enum/DA1.java test/tools/javac/enum/DA1.out test/tools/javac/enum/DA2.java test/tools/javac/enum/DA2.out test/tools/javac/enum/DA3.java test/tools/javac/enum/DA3.out test/tools/javac/enum/EnumProtectedConstructor.java test/tools/javac/enum/EnumProtectedConstructor.out test/tools/javac/enum/EnumPublicConstructor.java test/tools/javac/enum/EnumPublicConstructor.out test/tools/javac/enum/EnumSwitch2.java test/tools/javac/enum/EnumSwitch2.out test/tools/javac/enum/ExplicitlyAbstractEnum1.java test/tools/javac/enum/ExplicitlyAbstractEnum1.out test/tools/javac/enum/ExplicitlyAbstractEnum2.java test/tools/javac/enum/ExplicitlyAbstractEnum2.out test/tools/javac/enum/ExplicitlyFinalEnum1.java test/tools/javac/enum/ExplicitlyFinalEnum1.out test/tools/javac/enum/ExplicitlyFinalEnum2.java test/tools/javac/enum/ExplicitlyFinalEnum2.out
diffstat 20 files changed, 42 insertions(+), 266 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/enum/DA1.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/DA1.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,37 +1,11 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5023177
  * @summary One can refer static, const static variables from instance initializers of enum
  * @author gafter
- *
- * @compile/fail DA1.java
+ * @compile/fail/ref=DA1.out -XDrawDiagnostics  DA1.java
  */
 
-package da1;
-
 enum T1 {
     ;
     static int N = 12;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/DA1.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+DA1.java:12:13: compiler.err.illegal.enum.static.ref
+1 error
--- a/test/tools/javac/enum/DA2.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/DA2.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,37 +1,11 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5023177
  * @summary One can refer static, const static variables from instance initializers of enum
  * @author gafter
- *
- * @compile/fail DA2.java
+ * @compile/fail/ref=DA2.out -XDrawDiagnostics DA2.java
  */
 
-package da2;
-
 enum T2 {
     ;
     static int N = 12;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/DA2.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+DA2.java:13:17: compiler.err.illegal.enum.static.ref
+1 error
--- a/test/tools/javac/enum/DA3.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/DA3.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,37 +1,11 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5023177
  * @summary One can refer static, const static variables from instance initializers of enum
  * @author gafter
- *
- * @compile/fail DA3.java
+ * @compile/fail/ref=DA3.out -XDrawDiagnostics DA3.java
  */
 
-package da3;
-
 enum T3 {
     ;
     static int N = 12;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/DA3.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+DA3.java:13:17: compiler.err.illegal.enum.static.ref
+1 error
--- a/test/tools/javac/enum/EnumProtectedConstructor.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/EnumProtectedConstructor.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5009601
  * @summary enum constructors cannot be declared public or protected
  * @author Joseph D. Darcy
  *
- * @compile/fail EnumProtectedConstructor.java
+ * @compile/fail/ref=EnumProtectedConstructor.out -XDrawDiagnostics EnumProtectedConstructor.java
  */
 
 enum EnumProtectedConstructor {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumProtectedConstructor.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+EnumProtectedConstructor.java:16:15: compiler.err.mod.not.allowed.here: protected
+1 error
--- a/test/tools/javac/enum/EnumPublicConstructor.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/EnumPublicConstructor.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5009601
  * @summary enum constructors cannot be declared public or protected
  * @author Joseph D. Darcy
  *
- * @compile/fail EnumPublicConstructor.java
+ * @compile/fail/ref=EnumPublicConstructor.out -XDrawDiagnostics  EnumPublicConstructor.java
  */
 
 enum EnumPublicConstructor {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumPublicConstructor.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+EnumPublicConstructor.java:16:12: compiler.err.mod.not.allowed.here: public
+1 error
--- a/test/tools/javac/enum/EnumSwitch2.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/EnumSwitch2.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,37 +1,11 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 4936393
  * @summary enum switch case labels required to be unqualified.
  * @author gafter
- *
- * @compile/fail EnumSwitch2.java
+ * @compile/fail/ref=EnumSwitch2.out -XDrawDiagnostics EnumSwitch2.java
  */
 
-package enumswitch2;
-
 enum E1 { a, b, c, d, e }
 
 class EnumSwitch2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/EnumSwitch2.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,4 @@
+EnumSwitch2.java:14:16: compiler.err.enum.label.must.be.unqualified.enum
+EnumSwitch2.java:15:16: compiler.err.enum.label.must.be.unqualified.enum
+EnumSwitch2.java:15:9: compiler.err.duplicate.case.label
+3 errors
--- a/test/tools/javac/enum/ExplicitlyAbstractEnum1.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/ExplicitlyAbstractEnum1.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,33 +1,9 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5009601
  * @summary enum's cannot be explicitly declared abstract
  * @author Joseph D. Darcy
- *
- * @compile/fail ExplicitlyAbstractEnum1.java
+ * @compile/fail/ref=ExplicitlyAbstractEnum1.out -XDrawDiagnostics ExplicitlyAbstractEnum1.java
  */
 
 abstract enum ExplicitlyAbstractEnum1 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/ExplicitlyAbstractEnum1.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+ExplicitlyAbstractEnum1.java:9:10: compiler.err.mod.not.allowed.here: abstract
+1 error
--- a/test/tools/javac/enum/ExplicitlyAbstractEnum2.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/ExplicitlyAbstractEnum2.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,33 +1,9 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5009601
  * @summary enum's cannot be explicitly declared abstract even if they are abstract
  * @author Joseph D. Darcy
- *
- * @compile/fail ExplicitlyAbstractEnum2.java
+ * @compile/fail/ref=ExplicitlyAbstractEnum2.out -XDrawDiagnostics ExplicitlyAbstractEnum2.java
  */
 
 abstract enum ExplicitlyAbstractEnum2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/ExplicitlyAbstractEnum2.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+ExplicitlyAbstractEnum2.java:9:10: compiler.err.mod.not.allowed.here: abstract
+1 error
--- a/test/tools/javac/enum/ExplicitlyFinalEnum1.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/ExplicitlyFinalEnum1.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,33 +1,9 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5009601
  * @summary enum's cannot be explicitly declared final even if they are
  * @author Joseph D. Darcy
- *
- * @compile/fail ExplicitlyFinalEnum1.java
+ * @compile/fail/ref=ExplicitlyFinalEnum1.out -XDrawDiagnostics ExplicitlyFinalEnum1.java
  */
 
 final enum ExplicitlyFinalEnum1 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/ExplicitlyFinalEnum1.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+ExplicitlyFinalEnum1.java:9:7: compiler.err.mod.not.allowed.here: final
+1 error
--- a/test/tools/javac/enum/ExplicitlyFinalEnum2.java	Wed Jul 02 12:04:04 2014 -0700
+++ b/test/tools/javac/enum/ExplicitlyFinalEnum2.java	Wed Jul 02 13:29:58 2014 -0700
@@ -1,33 +1,9 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5009601
  * @summary enum's cannot be explicitly declared final
  * @author Joseph D. Darcy
- *
- * @compile/fail ExplicitlyFinalEnum2.java
+ * @compile/fail/ref=ExplicitlyFinalEnum2.out -XDrawDiagnostics ExplicitlyFinalEnum2.java
  */
 
 final enum ExplicitlyFinalEnum2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/enum/ExplicitlyFinalEnum2.out	Wed Jul 02 13:29:58 2014 -0700
@@ -0,0 +1,2 @@
+ExplicitlyFinalEnum2.java:9:7: compiler.err.mod.not.allowed.here: final
+1 error