8049126: golden files for annotations test in tools/java dir
authorsogoel
Thu, 28 Aug 2014 23:42:16 -0700
changeset 26273 2663ad455e00
parent 26272 4af552c8ad5c
child 26274 02a5b23ee21c
8049126: golden files for annotations test in tools/java dir Reviewed-by: jjg
langtools/test/tools/javac/annotations/neg/AnnComma.java
langtools/test/tools/javac/annotations/neg/AnnComma.out
langtools/test/tools/javac/annotations/neg/ArrayLit.java
langtools/test/tools/javac/annotations/neg/ArrayLit.out
langtools/test/tools/javac/annotations/neg/Constant.java
langtools/test/tools/javac/annotations/neg/Constant.out
langtools/test/tools/javac/annotations/neg/Cycle1.java
langtools/test/tools/javac/annotations/neg/Cycle1.out
langtools/test/tools/javac/annotations/neg/Cycle2.java
langtools/test/tools/javac/annotations/neg/Cycle2.out
langtools/test/tools/javac/annotations/neg/Cycle3.java
langtools/test/tools/javac/annotations/neg/Cycle3.out
langtools/test/tools/javac/annotations/neg/Dup.java
langtools/test/tools/javac/annotations/neg/Dup.out
langtools/test/tools/javac/annotations/neg/DupTarget.java
langtools/test/tools/javac/annotations/neg/DupTarget.out
langtools/test/tools/javac/annotations/neg/MemberOver.java
langtools/test/tools/javac/annotations/neg/MemberOver.out
--- a/langtools/test/tools/javac/annotations/neg/AnnComma.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/AnnComma.java	Thu Aug 28 23:42:16 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 4973531
  * @summary annotation syntax allows extra ',' in parameter list.
  * @author gafter
  *
- * @compile/fail AnnComma.java
+ * @compile/fail/ref=AnnComma.out -XDrawDiagnostics  AnnComma.java
  */
 
 package annComma;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/AnnComma.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,3 @@
+AnnComma.java:12:36: compiler.err.illegal.start.of.expr
+AnnComma.java:14:39: compiler.err.illegal.start.of.expr
+2 errors
--- a/langtools/test/tools/javac/annotations/neg/ArrayLit.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/ArrayLit.java	Thu Aug 28 23:42:16 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 4901266
  * @summary JSR175 (4): don't allow "new" in annotations
  * @author gafter
  *
- * @compile/fail ArrayLit.java
+ * @compile/fail/ref=ArrayLit.out -XDrawDiagnostics  ArrayLit.java
  */
 
 @ArrayLit(new int[] {1, 2, 3})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/ArrayLit.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+ArrayLit.java:10:15: compiler.err.new.not.allowed.in.annotation
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Constant.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Constant.java	Thu Aug 28 23:42:16 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2003, 2010, 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 4901268
  * @summary JSR175 (5): annotations must be "constants"
  * @author gafter
  *
- * @compile/fail Constant.java
+ * @compile/fail/ref=Constant.out -XDrawDiagnostics  Constant.java
  */
 
 package Constant;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Constant.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+Constant.java:12:9: compiler.err.attribute.value.must.be.constant
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Cycle1.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Cycle1.java	Thu Aug 28 23:42:16 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 4906400
  * @summary (JSR175) compiler allows self-containing annotation types
  * @author gafter
  *
- * @compile/fail Cycle1.java
+ * @compile/fail/ref=Cycle1.out -XDrawDiagnostics  Cycle1.java
  */
 
 package cycle1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Cycle1.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+Cycle1.java:13:9: compiler.err.cyclic.annotation.element
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Cycle2.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Cycle2.java	Thu Aug 28 23:42:16 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 4906400
  * @summary (JSR175) compiler allows self-containing annotation types
  * @author gafter
  *
- * @compile/fail Cycle2.java
+ * @compile/fail/ref=Cycle2.out -XDrawDiagnostics  Cycle2.java
  */
 
 package cycle2;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Cycle2.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+Cycle2.java:13:9: compiler.err.cyclic.annotation.element
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Cycle3.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Cycle3.java	Thu Aug 28 23:42:16 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 5044125
  * @summary javac allows cyclic annotation interfaces with arrays
  * @author gafter
  *
- * @compile/fail Cycle3.java
+ * @compile/fail/ref=Cycle3.out -XDrawDiagnostics  Cycle3.java
  */
 
 package cycle3;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Cycle3.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+Cycle3.java:17:9: compiler.err.cyclic.annotation.element
+1 error
--- a/langtools/test/tools/javac/annotations/neg/Dup.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/Dup.java	Thu Aug 28 23:42:16 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 4901265
  * @summary JSR175 (3): don't allow repeated annotations
  * @author gafter
  *
- * @compile/fail Dup.java
+ * @compile/fail/ref=Dup.out -XDrawDiagnostics  Dup.java
  */
 
 @Dup
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/Dup.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+Dup.java:11:1: compiler.err.duplicate.annotation.missing.container: Dup, java.lang.annotation.Repeatable
+1 error
--- a/langtools/test/tools/javac/annotations/neg/DupTarget.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/DupTarget.java	Thu Aug 28 23:42:16 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 <at>Target
  * @author gafter
  *
- * @compile/fail DupTarget.java
+ * @compile/fail/ref=DupTarget.out -XDrawDiagnostics  DupTarget.java
  */
 
+import static java.lang.annotation.ElementType.*;
+
 @java.lang.annotation.Target({TYPE, FIELD, PACKAGE, FIELD})
 @interface DupTarget {
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/DupTarget.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+DupTarget.java:12:53: compiler.err.repeated.annotation.target
+1 error
--- a/langtools/test/tools/javac/annotations/neg/MemberOver.java	Thu Aug 28 11:29:34 2014 -0700
+++ b/langtools/test/tools/javac/annotations/neg/MemberOver.java	Thu Aug 28 23:42:16 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 4989667
  * @summary Annotation members must not have same signature as Object or Annotation members
  * @author gafter
  *
- * @compile/fail MemberOver.java
+ * @compile/fail/ref=MemberOver.out -XDrawDiagnostics  MemberOver.java
  */
 
 package memberOver;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/neg/MemberOver.out	Thu Aug 28 23:42:16 2014 -0700
@@ -0,0 +1,2 @@
+MemberOver.java:13:9: compiler.err.intf.annotation.member.clash: hashCode(), java.lang.annotation.Annotation
+1 error