8049129: Group 8c - golden files for annotations test in tools/java dir
authorsogoel
Tue, 12 Aug 2014 17:39:56 -0700
changeset 26096 7368b1ed9450
parent 26095 8062f96d3ced
child 26097 4a16592140fa
8049129: Group 8c - golden files for annotations test in tools/java dir Reviewed-by: jjg
langtools/test/tools/javac/annotations/neg/WrongTarget.java
langtools/test/tools/javac/annotations/neg/WrongTarget.out
langtools/test/tools/javac/annotations/neg/WrongTarget2.java
langtools/test/tools/javac/annotations/neg/WrongTarget2.out
langtools/test/tools/javac/annotations/neg/WrongValue.java
langtools/test/tools/javac/annotations/neg/WrongValue.out
langtools/test/tools/javac/annotations/neg/Z10.java
langtools/test/tools/javac/annotations/neg/Z10.out
langtools/test/tools/javac/annotations/neg/Z11.java
langtools/test/tools/javac/annotations/neg/Z11.out
langtools/test/tools/javac/annotations/neg/Z12.java
langtools/test/tools/javac/annotations/neg/Z12.out
langtools/test/tools/javac/annotations/neg/Z13.java
langtools/test/tools/javac/annotations/neg/Z13.out
langtools/test/tools/javac/annotations/neg/Z14.java
langtools/test/tools/javac/annotations/neg/Z14.out
langtools/test/tools/javac/annotations/neg/Z15.java
langtools/test/tools/javac/annotations/neg/Z15.out
langtools/test/tools/javac/annotations/neg/Z16.java
langtools/test/tools/javac/annotations/neg/Z16.out
--- a/langtools/test/tools/javac/annotations/neg/WrongTarget.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/WrongTarget.java	Tue Aug 12 17:39:56 2014 -0700
@@ -1,35 +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 4901271
  * @summary java.lang.annotation.Target
  * @author gafter
  *
- * @compile/fail WrongTarget.java
+ * @compile/fail/ref=WrongTarget.out -XDrawDiagnostics  WrongTarget.java
  */
 
+import static java.lang.annotation.ElementType.*;
+
 @java.lang.annotation.Target({FIELD})
 @interface foo {
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/WrongTarget.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+WrongTarget.java:16:1: compiler.err.annotation.type.not.applicable
+1 error
--- a/langtools/test/tools/javac/annotations/neg/WrongTarget2.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/WrongTarget2.java	Tue Aug 12 17:39:56 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 4973504
  * @summary Compiler allows Inherited meta-attribute on local variable declaration.
  * @author gafter
  *
- * @compile/fail WrongTarget2.java
+ * @compile/fail/ref=WrongTarget2.out -XDrawDiagnostics  WrongTarget2.java
  */
 
 import java.lang.annotation.Inherited;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/WrongTarget2.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+WrongTarget2.java:12:6: compiler.err.annotation.type.not.applicable
+1 error
--- a/langtools/test/tools/javac/annotations/neg/WrongValue.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/WrongValue.java	Tue Aug 12 17:39:56 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 4951298
  * @summary compiler: crashes when attributes with same elements are used in place of other
  * @author gafter
  *
- * @compile/fail WrongValue.java
+ * @compile/fail/ref=WrongValue.out -XDrawDiagnostics  WrongValue.java
  */
 
 @interface TestM2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/WrongValue.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+WrongValue.java:25:5: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: TestM3, TestM2)
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z10.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z10.java	Tue Aug 12 17:39:56 2014 -0700
@@ -1,37 +1,12 @@
 /*
- * 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 Z10.java
+ * @compile/fail/ref=Z10.out -XDrawDiagnostics  Z10.java
  */
 
-enum Color { red, green, blue }
-
 @interface An {
     int[][] a();
  }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z10.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z10.java:11:8: compiler.err.invalid.annotation.member.type
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z11.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z11.java	Tue Aug 12 17:39:56 2014 -0700
@@ -1,37 +1,12 @@
 /*
- * 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 Z11.java
+ * @compile/fail/ref=Z11.out -XDrawDiagnostics  Z11.java
  */
 
-enum Color { red, green, blue }
-
 class X {}
 
 @interface An {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z11.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z11.java:13:5: compiler.err.invalid.annotation.member.type
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z12.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z12.java	Tue Aug 12 17:39:56 2014 -0700
@@ -1,37 +1,12 @@
 /*
- * 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 Z12.java
+ * @compile/fail/ref=Z12.out -XDrawDiagnostics  Z12.java
  */
 
-enum Color { red, green, blue }
-
 @interface An {
     void a();
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z12.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z12.java:11:5: compiler.err.invalid.annotation.member.type
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z13.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z13.java	Tue Aug 12 17:39:56 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 Z13.java
+ * @compile/fail/ref=Z13.out -XDrawDiagnostics  Z13.java
  */
 
 @interface An {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z13.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z13.java:11:20: compiler.err.throws.not.allowed.in.intf.annotation
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z14.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z14.java	Tue Aug 12 17:39:56 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 Z14.java
+ * @compile/fail/ref=Z14.out -XDrawDiagnostics  Z14.java
  */
 
 @interface An<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z14.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z14.java:10:15: compiler.err.intf.annotation.cant.have.type.params
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z15.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z15.java	Tue Aug 12 17:39:56 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 Z15.java
+ * @compile/fail/ref=Z15.out -XDrawDiagnostics  Z15.java
  */
 
 @interface An {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z15.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z15.java:11:36: compiler.err.attribute.value.must.be.constant
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Z16.java	Tue Aug 12 17:31:31 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Z16.java	Tue Aug 12 17:39:56 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 Z16.java
+ * @compile/fail/ref=Z16.out -XDrawDiagnostics  Z16.java
  */
 
 enum Color { red, green, blue }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Z16.out	Tue Aug 12 17:39:56 2014 -0700
@@ -0,0 +1,2 @@
+Z16.java:13:27: compiler.err.cant.resolve.location: kindname.variable, redx, , , (compiler.misc.location: kindname.annotation, Colored, null)
+1 error