8055074: Group 9a: golden files for tests in tools/javac dir
authorsogoel
Fri, 29 Aug 2014 00:42:42 -0700
changeset 26274 02a5b23ee21c
parent 26273 2663ad455e00
child 26275 d2ca1fed21a9
8055074: Group 9a: golden files for tests in tools/javac dir Reviewed-by: jjg
langtools/test/tools/javac/Ambig3.java
langtools/test/tools/javac/Ambig3.out
langtools/test/tools/javac/BadAnnotation.java
langtools/test/tools/javac/BadAnnotation.out
langtools/test/tools/javac/BadCovar.java
langtools/test/tools/javac/BadCovar.out
langtools/test/tools/javac/BadHexConstant.java
langtools/test/tools/javac/BadHexConstant.out
langtools/test/tools/javac/BoundClassError.java
langtools/test/tools/javac/BoundClassError.out
langtools/test/tools/javac/BreakAcrossClass.java
langtools/test/tools/javac/BreakAcrossClass.out
langtools/test/tools/javac/ClassIsAbstract.java
langtools/test/tools/javac/ClassIsAbstract.out
langtools/test/tools/javac/ClassToTypeParm.java
langtools/test/tools/javac/ClassToTypeParm.out
langtools/test/tools/javac/CompoundBox.java
langtools/test/tools/javac/CompoundBox.out
--- a/langtools/test/tools/javac/Ambig3.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/Ambig3.java	Fri Aug 29 00:42:42 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * 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 4906586
  * @summary Missing ambiguity error when two methods are equally specific
  * @author gafter
  *
- * @compile/fail Ambig3.java
+ * @compile/fail/ref=Ambig3.out -XDrawDiagnostics  Ambig3.java
  */
 
 class Test<T,E> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Ambig3.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,3 @@
+Ambig3.java:14:14: compiler.err.name.clash.same.erasure: check(E), check(T)
+Ambig3.java:20:1: compiler.err.concrete.inheritance.conflict: check(E), Test<java.lang.String,java.lang.String>, check(T), Test<java.lang.String,java.lang.String>, Test<java.lang.String,java.lang.String>
+2 errors
--- a/langtools/test/tools/javac/BadAnnotation.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/BadAnnotation.java	Fri Aug 29 00:42:42 2014 -0700
@@ -1,32 +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 5014305
  * @summary Malformed annotation type with varargs parameter crashes javac
  *
- * @compile/fail BadAnnotation.java
+ * @compile/fail/ref=BadAnnotation.out -XDrawDiagnostics  BadAnnotation.java
  */
 
    @BadAnnotation(1)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/BadAnnotation.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+BadAnnotation.java:11:29: compiler.err.intf.annotation.members.cant.have.params
+1 error
--- a/langtools/test/tools/javac/BadCovar.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/BadCovar.java	Fri Aug 29 00:42:42 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 5007379
  * @summary Compiler allows inheritance of multiple methods with unrelated return types
  * @author gafter
  *
- * @compile/fail BadCovar.java
+ * @compile/fail/ref=BadCovar.out -XDrawDiagnostics  BadCovar.java
  */
 
 package bad.covar;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/BadCovar.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+BadCovar.java:22:10: compiler.err.types.incompatible.diff.ret: bad.covar.B, bad.covar.A, f()
+1 error
--- a/langtools/test/tools/javac/BadHexConstant.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/BadHexConstant.java	Fri Aug 29 00:42:42 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 4049982
  * @summary Compiler permitted invalid hex literal.
  * @author turnidge
  *
- * @compile/fail BadHexConstant.java
+ * @compile/fail/ref=BadHexConstant.out -XDrawDiagnostics  BadHexConstant.java
  */
 
 public
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/BadHexConstant.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,3 @@
+BadHexConstant.java:12:14: compiler.err.invalid.hex.number
+BadHexConstant.java:12:17: compiler.err.expected: token.identifier
+2 errors
--- a/langtools/test/tools/javac/BoundClassError.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/BoundClassError.java	Fri Aug 29 00:42:42 2014 -0700
@@ -1,32 +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 4980352
  * @summary Verify compiler doesn't throw a NullPointerException when compiling.
  * @author tball
  *
- * @compile/fail BoundClassError.java
+ * @compile/fail/ref=BoundClassError.out -XDrawDiagnostics  BoundClassError.java
  */
 public class BoundClassError <T extends String&Comparable<BoundClassError>> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/BoundClassError.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+BoundClassError.java:9:31: compiler.err.cant.inherit.diff.arg: java.lang.Comparable, BoundClassError, java.lang.String
+1 error
--- a/langtools/test/tools/javac/BreakAcrossClass.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/BreakAcrossClass.java	Fri Aug 29 00:42:42 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2001, 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 4407643
  * @summary javac throws NullPointerException for break to label outside of class
  * @author gafter
  *
- * @compile/fail BreakAcrossClass.java
+ * @compile/fail/ref=BreakAcrossClass.out -XDrawDiagnostics  BreakAcrossClass.java
  */
 
 class BreakAcrossClass {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/BreakAcrossClass.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+BreakAcrossClass.java:16:33: compiler.err.undef.label: M
+1 error
--- a/langtools/test/tools/javac/ClassIsAbstract.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/ClassIsAbstract.java	Fri Aug 29 00:42:42 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * Copyright (c) 1998, 2001, 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 4110534
  * @summary The fix for 1240831 broke the compiler.  It should
  *          report that class Abs cannot be instantiated.
  * @author turnidge
  *
- * @compile/fail ClassIsAbstract.java
+ * @compile/fail/ref=ClassIsAbstract.out -XDrawDiagnostics  ClassIsAbstract.java
  */
 
 abstract class Abs {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ClassIsAbstract.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+ClassIsAbstract.java:16:9: compiler.err.abstract.cant.be.instantiated: Abs
+1 error
--- a/langtools/test/tools/javac/ClassToTypeParm.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/ClassToTypeParm.java	Fri Aug 29 00:42:42 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 4948144
  * @summary Generics: assignment of Class to type parm's default should elicit error
  * @author never
  *
- * @compile/fail ClassToTypeParm.java
+ * @compile/fail/ref=ClassToTypeParm.out -XDrawDiagnostics  ClassToTypeParm.java
  */
 
 class ClassToTypeParm<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ClassToTypeParm.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+ClassToTypeParm.java:12:15: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.Class, T)
+1 error
--- a/langtools/test/tools/javac/CompoundBox.java	Thu Aug 28 23:42:16 2014 -0700
+++ b/langtools/test/tools/javac/CompoundBox.java	Fri Aug 29 00:42:42 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * 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 4960369
  * @summary drop compound boxing operations
  * @author gafter
  *
- * @compile/fail CompoundBox.java
+ * @compile/fail/ref=CompoundBox.out -XDrawDiagnostics  CompoundBox.java
  */
 
 class CompoundBox {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/CompoundBox.out	Fri Aug 29 00:42:42 2014 -0700
@@ -0,0 +1,2 @@
+CompoundBox.java:12:19: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.Float)
+1 error