8055783: Group 9e: golden files for tests in tools/javac dir
authorsogoel
Wed, 01 Oct 2014 14:15:40 -0700
changeset 26901 2c11dc81a5c8
parent 26900 dccc7a72526d
child 26902 adc83124cc10
8055783: Group 9e: golden files for tests in tools/javac dir Reviewed-by: jjg, mcimadamore
langtools/test/tools/javac/T6306967.java
langtools/test/tools/javac/T6306967.out
langtools/test/tools/javac/T6379327.java
langtools/test/tools/javac/T6379327.out
langtools/test/tools/javac/T6407257.java
langtools/test/tools/javac/T6407257.out
langtools/test/tools/javac/T6663588.java
langtools/test/tools/javac/T6663588.out
langtools/test/tools/javac/UncaughtOverflow.java
langtools/test/tools/javac/UncaughtOverflow.out
langtools/test/tools/javac/UncaughtOverflow2.java
langtools/test/tools/javac/UseEnum.java
langtools/test/tools/javac/UseEnum.out
langtools/test/tools/javac/VoidArray.java
langtools/test/tools/javac/VoidArray.out
--- a/langtools/test/tools/javac/T6306967.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/T6306967.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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     6306967
  * @summary Variable x is used before initialized
  * @author  Wei Tao
- * @compile/fail T6306967.java
+ * @compile/fail/ref=T6306967.out -XDrawDiagnostics T6306967.java
  */
 
 public class T6306967 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6306967.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,2 @@
+T6306967.java:18:28: compiler.err.var.might.not.have.been.initialized: x
+1 error
--- a/langtools/test/tools/javac/T6379327.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/T6379327.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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     6379327
  * @summary Erroneous catch block not detected with anonymous class declaration
  * @author  Peter Jones, Wei Tao
- * @compile/fail T6379327.java
+ * @compile/fail/ref=T6379327.out -XDrawDiagnostics T6379327.java
  */
 
 import java.security.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6379327.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,2 @@
+T6379327.java:19:11: compiler.err.except.never.thrown.in.try: java.lang.ClassNotFoundException
+1 error
--- a/langtools/test/tools/javac/T6407257.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/T6407257.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 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     6407257
  * @summary javac locks up when encountering cyclic inheritance
  * @author  Peter von der Ah\u00e9
- * @compile/fail T6407257.java
+ * @compile/fail/ref=T6407257.out -XDrawDiagnostics T6407257.java
  */
 
 class T6407257a extends T6407257a {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6407257.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,2 @@
+T6407257.java:9:1: compiler.err.cyclic.inheritance: T6407257a
+1 error
--- a/langtools/test/tools/javac/T6663588.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/T6663588.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2008, 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 6663588
  * @summary Compiler goes into infinite loop for Cyclic Inheritance test case
  * @author Maurizio Cimadamore
- * @compile/fail T6663588.java
+ * @compile/fail/ref=T6663588.out -XDrawDiagnostics T6663588.java
  */
 
 public class T6663588<T extends T6663588.Inner> extends T6663588 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6663588.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,2 @@
+T6663588.java:9:8: compiler.err.cyclic.inheritance: T6663588
+1 error
--- a/langtools/test/tools/javac/UncaughtOverflow.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/UncaughtOverflow.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,36 +1,14 @@
 /*
- * Copyright (c) 1997, 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
- * @bug 4035346
+ * @test /nodynamiccopyright/
+ * @bug 4035346 4097402
  * @summary Compiler used to allow this initialization, despite the overflow.
  * @author turnidge
  *
- * @compile/fail UncaughtOverflow.java
+ * @compile/fail/ref=UncaughtOverflow.out -XDrawDiagnostics UncaughtOverflow.java
  */
 
 public
 class UncaughtOverflow {
-    int i = 100000000000;
+    int i1 = 100000000000;
+    int i2 = -2147483649;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/UncaughtOverflow.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,3 @@
+UncaughtOverflow.java:12:14: compiler.err.int.number.too.large: 100000000000
+UncaughtOverflow.java:13:15: compiler.err.int.number.too.large: -2147483649
+2 errors
--- a/langtools/test/tools/javac/UncaughtOverflow2.java	Fri Sep 26 13:51:43 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1998, 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
- * @bug 4097402
- * @summary Compiler used to allow this initialization, despite the overflow.
- * @author turnidge
- *
- * @compile/fail UncaughtOverflow2.java
- */
-
-public
-class UncaughtOverflow2 {
-    int i = -2147483649;
-}
--- a/langtools/test/tools/javac/UseEnum.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/UseEnum.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,40 +1,16 @@
 /*
- * 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 5013488
  * @summary Compiler AssertionError: com.sun.tools.javac.util.Bits.incl(Bits.java:73)
  *
- * @compile/fail UseEnum.java
+ * @compile/fail/ref=UseEnum.out -XDrawDiagnostics UseEnum.java
  */
 
 import static java.lang.System.out;
 
 class UseEnum {
-
+    enum Animal {cat, dog, bird, fish};
     public static void main(String args[]) {
-        enum Animal {cat, dog, bird, fish};
         Animal pet;
 
         pet = Animal.cat;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/UseEnum.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,2 @@
+UseEnum.java:19:29: compiler.err.cant.resolve.location: kindname.variable, beast, , , (compiler.misc.location: kindname.class, UseEnum, null)
+1 error
--- a/langtools/test/tools/javac/VoidArray.java	Fri Sep 26 13:51:43 2014 -0700
+++ b/langtools/test/tools/javac/VoidArray.java	Wed Oct 01 14:15:40 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 1997, 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 4034979
  * @summary The compiler should never allow void[] to appear as a type
  *          in a program.
  *
- * @compile/fail VoidArray.java
+ * @compile/fail/ref=VoidArray.out -XDrawDiagnostics VoidArray.java
  */
 
 public
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/VoidArray.out	Wed Oct 01 14:15:40 2014 -0700
@@ -0,0 +1,7 @@
+VoidArray.java:12:9: compiler.err.expected: token.identifier
+VoidArray.java:12:13: compiler.err.expected: token.identifier
+VoidArray.java:14:9: compiler.err.expected: token.identifier
+VoidArray.java:14:12: compiler.err.invalid.meth.decl.ret.type.req
+VoidArray.java:14:24: compiler.err.expected: token.identifier
+VoidArray.java:14:28: compiler.err.expected3: ',', ')', '['
+6 errors