8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir
authorsogoel
Thu, 05 Jun 2014 10:44:38 -0700
changeset 24796 f940af3221e2
parent 24795 ff348aab3b54
child 24797 850ebd4d80a7
8044064: Group 1: create .out files for cast and capture negative tests in tools/javac dir Reviewed-by: jjg
langtools/test/tools/javac/CaptureInSubtype.java
langtools/test/tools/javac/CaptureInSubtype.out
langtools/test/tools/javac/capture/Capture2.java
langtools/test/tools/javac/capture/Capture2.out
langtools/test/tools/javac/capture/Martin.java
langtools/test/tools/javac/capture/Martin.out
langtools/test/tools/javac/capture/T6594284.java
langtools/test/tools/javac/capture/T6594284.out
langtools/test/tools/javac/cast/5064736/T5064736.java
langtools/test/tools/javac/cast/5064736/T5064736.out
langtools/test/tools/javac/cast/6219964/T6219964.java
langtools/test/tools/javac/cast/6219964/T6219964.out
langtools/test/tools/javac/cast/6302956/T6302956.java
langtools/test/tools/javac/cast/6302956/T6302956.out
langtools/test/tools/javac/cast/6548436/T6548436d.java
langtools/test/tools/javac/cast/6548436/T6548436d.out
langtools/test/tools/javac/cast/BoxedArray.java
langtools/test/tools/javac/cast/BoxedArray.out
--- a/langtools/test/tools/javac/CaptureInSubtype.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/CaptureInSubtype.java	Thu Jun 05 10:44:38 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
- * @bug 5044157
+ * @test /nodynamiccopyright/
+ * @bug 5044626
  * @summary type system loophole in wildcard substitution
  * @author Gilad Bracha
  *
- * @compile/fail CaptureInSubtype.java
+ * @compile/fail/ref=CaptureInSubtype.out -XDrawDiagnostics  CaptureInSubtype.java
  */
 
 import java.util.List;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/CaptureInSubtype.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+CaptureInSubtype.java:38:17: compiler.err.override.incompatible.ret: (compiler.misc.cant.override: m(), CaptureInSubtype.ShowFlaw, m(), CaptureInSubtype.SuperOfShowFlaw), CaptureInSubtype.Flaw<?>, CaptureInSubtype.SuperOfFlaw<java.util.List<?>>
+1 error
--- a/langtools/test/tools/javac/capture/Capture2.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/capture/Capture2.java	Thu Jun 05 10:44:38 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 5029773
- * @summary soundness problem with failure to subsitute wildcard as type formal argument
+ * @summary soundness problem with failure to substitute wildcard as type formal argument
  * @author gafter
  *
- * @compile/fail Capture2.java
+ * @compile/fail/ref=Capture2.out -XDrawDiagnostics  Capture2.java
  */
 
 package capture2;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/capture/Capture2.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+Capture2.java:17:23: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.captureof: 1, ?, T)
+1 error
--- a/langtools/test/tools/javac/capture/Martin.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/capture/Martin.java	Thu Jun 05 10:44:38 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     6384510
  * @summary improper handling of wildcard captures
  * @author  Martin Buchholz
- * @compile/fail Martin.java
+ * @compile/fail/ref=Martin.out -XDrawDiagnostics  Martin.java
  */
 
 import java.util.List;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/capture/Martin.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+Martin.java:15:11: compiler.err.cant.apply.symbols: kindname.method, addAll, java.util.List<compiler.misc.type.captureof: 1, ?>,{(compiler.misc.inapplicable.method: kindname.method, java.util.Collection, addAll(java.util.Collection<? extends compiler.misc.type.captureof: 2, ?>), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.Collection<? extends compiler.misc.type.captureof: 2, ?>))),(compiler.misc.inapplicable.method: kindname.method, java.util.List, addAll(java.util.Collection<? extends compiler.misc.type.captureof: 2, ?>), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.Collection<? extends compiler.misc.type.captureof: 2, ?>))),(compiler.misc.inapplicable.method: kindname.method, java.util.List, addAll(int,java.util.Collection<? extends compiler.misc.type.captureof: 2, ?>), (compiler.misc.arg.length.mismatch))}
+1 error
--- a/langtools/test/tools/javac/capture/T6594284.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/capture/T6594284.java	Thu Jun 05 10:44:38 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * 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 6594284
  * @summary NPE thrown when calling a method on an intersection type
  * @author Maurizio Cimadamore
  *
- * @compile/fail T6594284.java
+ * @compile/fail/ref=T6594284.out -XDrawDiagnostics  T6594284.java
  */
 
 public class T6594284 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/capture/T6594284.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+T6594284.java:18:24: compiler.err.not.within.bounds: ? extends T6594284.E, T
+1 error
--- a/langtools/test/tools/javac/cast/5064736/T5064736.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/cast/5064736/T5064736.java	Thu Jun 05 10:44:38 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 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     5064736
  * @summary Incompatible types are cast without error
- * @compile/fail T5064736.java
+ * @compile/fail/ref=T5064736.out -XDrawDiagnostics  T5064736.java
  */
 
 public class T5064736 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/5064736/T5064736.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+T5064736.java:14:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T5064736.Foo<compiler.misc.type.captureof: 1, ? super T5064736.A>, T5064736.Foo<U>)
+1 error
--- a/langtools/test/tools/javac/cast/6219964/T6219964.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/cast/6219964/T6219964.java	Thu Jun 05 10:44:38 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 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     6219964
  * @summary Compiler allows illegal cast of anonymous inner class
- * @compile/fail T6219964.java
+ * @compile/fail/ref=T6219964.out -XDrawDiagnostics  T6219964.java
  */
 
 public class T6219964 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/6219964/T6219964.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+T6219964.java:13:27: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: java.lang.Object, T6219964.I)
+1 error
--- a/langtools/test/tools/javac/cast/6302956/T6302956.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/cast/6302956/T6302956.java	Thu Jun 05 10:44:38 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 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     6302956
  * @summary Illegal cast allowed Properties -> Map<String, String>
- * @compile/fail T6302956.java
+ * @compile/fail/ref=T6302956.out -XDrawDiagnostics  T6302956.java
  */
 
 import java.util.Map;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/6302956/T6302956.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+T6302956.java:12:57: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.util.Properties, java.util.Map<java.lang.String,java.lang.String>)
+1 error
--- a/langtools/test/tools/javac/cast/6548436/T6548436d.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/cast/6548436/T6548436d.java	Thu Jun 05 10:44:38 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2008, 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
- * @bug 6548436
+ * @test /nodynamiccopyright/
+ * @bug  6548436
  * @summary Incorrect inconvertible types error
  * @author Maurizio Cimadamore
  *
- * @compile/fail T6548436d.java
+ * @compile/fail/ref=T6548436d.out -XDrawDiagnostics  T6548436d.java
  */
 
 public class T6548436d {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/6548436/T6548436d.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+T6548436d.java:15:35: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T6548436d.Base<compiler.misc.type.captureof: 1, ? extends java.lang.Double>, T6548436d.Base<java.lang.Integer>)
+1 error
--- a/langtools/test/tools/javac/cast/BoxedArray.java	Thu Jun 05 12:21:38 2014 +0100
+++ b/langtools/test/tools/javac/cast/BoxedArray.java	Thu Jun 05 10:44:38 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 5014309
  * @summary REGRESSION: compiler allows cast from Integer[] to int[]
  * @author gafter
  *
- * @compile/fail BoxedArray.java
+ * @compile/fail/ref=BoxedArray.out -XDrawDiagnostics  BoxedArray.java
  */
 
 public class BoxedArray {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/BoxedArray.out	Thu Jun 05 10:44:38 2014 -0700
@@ -0,0 +1,2 @@
+BoxedArray.java:13:22: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.Integer[], int[])
+1 error