8049130: Group 8d - golden files for annotations test in tools/java dir
authorsogoel
Tue, 12 Aug 2014 17:48:30 -0700
changeset 26097 4a16592140fa
parent 26096 7368b1ed9450
child 26098 32588700060b
8049130: Group 8d - golden files for annotations test in tools/java dir Reviewed-by: jjg
langtools/test/tools/javac/annotations/neg/Z1.java
langtools/test/tools/javac/annotations/neg/Z1.out
langtools/test/tools/javac/annotations/neg/Z2.java
langtools/test/tools/javac/annotations/neg/Z2.out
langtools/test/tools/javac/annotations/neg/Z3.java
langtools/test/tools/javac/annotations/neg/Z3.out
langtools/test/tools/javac/annotations/neg/Z4.java
langtools/test/tools/javac/annotations/neg/Z4.out
langtools/test/tools/javac/annotations/neg/Z5.java
langtools/test/tools/javac/annotations/neg/Z5.out
langtools/test/tools/javac/annotations/neg/Z8.java
langtools/test/tools/javac/annotations/neg/Z8.out
langtools/test/tools/javac/annotations/neg/Z9.java
langtools/test/tools/javac/annotations/neg/Z9.out
langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.java
langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.out
langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.java
langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.out
langtools/test/tools/javac/annotations/typeAnnotations/failures/VoidGenericMethod.java
langtools/test/tools/javac/annotations/typeAnnotations/failures/VoidGenericMethod.out
--- a/langtools/test/tools/javac/annotations/neg/Z1.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z1.java	Tue Aug 12 17:48:30 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z1.java
+ * @compile/fail/ref=Z1.out -XDrawDiagnostics  Z1.java
  */
 
 enum Color { red, green, blue }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z1.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z1.java:16:10: compiler.err.cant.resolve: kindname.variable, teal, , 
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z2.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z2.java	Tue Aug 12 17:48:30 2014 -0700
@@ -1,37 +1,14 @@
 /*
- * 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z2.java
+ * @compile/fail/ref=Z2.out -XDrawDiagnostics  Z2.java
  */
 
 enum Color { red, green, blue }
 
 interface Colored {
-    Color value() default red;
+    Color value() default Color.red;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z2.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z2.java:13:11: compiler.err.default.allowed.in.intf.annotation.member
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z3.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z3.java	Tue Aug 12 17:48:30 2014 -0700
@@ -1,37 +1,14 @@
 /*
- * 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z3.java
+ * @compile/fail/ref=Z3.out -XDrawDiagnostics  Z3.java
  */
 
 enum Color { red, green, blue }
 
 class Colored {
-    Color value() default red;
+    Color value() default Color.red;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z3.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z3.java:13:11: compiler.err.missing.meth.body.or.decl.abstract
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z4.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z4.java	Tue Aug 12 17:48:30 2014 -0700
@@ -1,37 +1,14 @@
 /*
- * 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z4.java
+ * @compile/fail/ref=Z4.out -XDrawDiagnostics  Z4.java
  */
 
 enum Color { red, green, blue }
 
 @interface Colored {
-    Color value() default teal;
+    Color value() default Color.teal;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z4.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z4.java:13:32: compiler.err.cant.resolve.location: kindname.variable, teal, , , (compiler.misc.location: kindname.class, Color, null)
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z5.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z5.java	Tue Aug 12 17:48:30 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z5.java
+ * @compile/fail/ref=Z5.out -XDrawDiagnostics  Z5.java
  */
 
 interface Foo {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z5.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z5.java:12:28: compiler.err.cant.extend.intf.annotation
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z8.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z8.java	Tue Aug 12 17:48:30 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z8.java
+ * @compile/fail/ref=Z8.out -XDrawDiagnostics  Z8.java
  */
 
 @interface An {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z8.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z8.java:11:15: compiler.err.intf.annotation.members.cant.have.params
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z9.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z9.java	Tue Aug 12 17:48:30 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 4865660
  * @summary implement "metadata" (attribute interfaces and program annotations)
  * @author gafter
  *
- * @compile/fail Z9.java
+ * @compile/fail/ref=Z9.out -XDrawDiagnostics  Z9.java
  */
 
 @interface An {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z9.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+Z9.java:11:6: compiler.err.intf.annotation.members.cant.have.type.params
+1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.java	Tue Aug 12 17:48:30 2014 -0700
@@ -1,30 +1,7 @@
 /*
- * Copyright (c) 2012, 2013, 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/
  * @summary Smoke test for repeating annotations
- * @compile/fail RepeatingAndContainerPresent.java
+ * @compile/fail/ref=RepeatingAndContainerPresent.out -XDrawDiagnostics  RepeatingAndContainerPresent.java
  * @bug 7151010
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+RepeatingAndContainerPresent.java:20:1: compiler.err.invalid.repeatable.annotation.repeated.and.container.present: Foos
+1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.java	Tue Aug 12 17:48:30 2014 -0700
@@ -1,30 +1,7 @@
 /*
- * Copyright (c) 2012, 2013, 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/
  * @summary Smoke test for repeating annotations
- * @compile/fail UseWrongRepeatable.java
+ * @compile/fail/ref=UseWrongRepeatable.out -XDrawDiagnostics  UseWrongRepeatable.java
  * @bug 7151010
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,4 @@
+UseWrongRepeatable.java:17:1: compiler.err.invalid.repeatable.annotation.value.return: java.lang.annotation.Target, java.lang.annotation.ElementType[], UseWrongRepeatable[]
+UseWrongRepeatable.java:17:21: compiler.err.invalid.repeatable.annotation.value.return: java.lang.annotation.Target, java.lang.annotation.ElementType[], UseWrongRepeatable[]
+UseWrongRepeatable.java:14:1: compiler.err.invalid.repeatable.annotation.value.return: java.lang.annotation.Target, java.lang.annotation.ElementType[], UseWrongRepeatable[]
+3 errors
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/VoidGenericMethod.java	Tue Aug 12 17:39:56 2014 -0700
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/VoidGenericMethod.java	Tue Aug 12 17:48:30 2014 -0700
@@ -1,35 +1,12 @@
 /*
- * Copyright (c) 2008, 2013, 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 /nodynamiccopyright/
+ * @bug 6843077 8006775
+ * @summary test type annotation on void generic methods
+ * @author Mahmood Ali
+ * @compile/fail/ref=VoidGenericMethod.out -XDrawDiagnostics  VoidGenericMethod.java
  */
 
 import java.lang.annotation.*;
-
-/*
- * @test
- * @bug 6843077 8006775
- * @summary test type annotation on void generic methods
- * @author Mahmood Ali
- * @compile/fail VoidGenericMethod.java
- */
 class VoidGenericMethod {
   public @A <T> void method() { }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/VoidGenericMethod.out	Tue Aug 12 17:48:30 2014 -0700
@@ -0,0 +1,2 @@
+VoidGenericMethod.java:11:10: compiler.err.annotation.type.not.applicable
+1 error