changeset 3490:06b98d7646e7

8048836: .out files for generics tests in tools/javac dir Reviewed-by: jjg
author sogoel
date Thu, 17 Jul 2014 11:14:39 -0700
parents 5ac5790e3fc9
children 306ecd42b96f
files test/tools/javac/generics/6495506/T6495506.java test/tools/javac/generics/6495506/T6495506.out test/tools/javac/generics/CatchTyparam.java test/tools/javac/generics/CatchTyparam.out test/tools/javac/generics/inference/4941882/T4941882.java test/tools/javac/generics/inference/4941882/T4941882.out test/tools/javac/generics/inference/4972073/T4972073.java test/tools/javac/generics/inference/4972073/T4972073.out test/tools/javac/generics/inference/4972073/T4972073a.java test/tools/javac/generics/inference/4972073/T4972073a.out test/tools/javac/generics/inference/4972073/T4972073b.java test/tools/javac/generics/inference/4972073/T4972073b.out test/tools/javac/generics/inference/5081782/Neg.java test/tools/javac/generics/inference/5081782/Neg.out test/tools/javac/generics/rawOverride/Fail1.java test/tools/javac/generics/rawOverride/Fail1.out
diffstat 16 files changed, 40 insertions(+), 200 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/generics/6495506/T6495506.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/6495506/T6495506.java	Thu Jul 17 11:14:39 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 2007, 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     6495506
  * @summary Cast inserted by generics can cause IllegalAccessError
  * @compile A.java
- * @compile/fail T6495506.java
+ * @compile/fail/ref=T6495506.out -XDrawDiagnostics  T6495506.java
  */
 
 public class T6495506 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/6495506/T6495506.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,2 @@
+T6495506.java:12:28: compiler.err.report.access: a.A.P, private, a.A
+1 error
--- a/test/tools/javac/generics/CatchTyparam.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/CatchTyparam.java	Thu Jul 17 11:14:39 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 5057445
  * @summary javac allows catching type parameter
  * @author gafter
  *
- * @compile/fail CatchTyparam.java
+ * @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics  CatchTyparam.java
  */
 
 class J {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/CatchTyparam.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,3 @@
+CatchTyparam.java:14:18: compiler.err.type.found.req: (compiler.misc.type.parameter: T), (compiler.misc.type.req.class)
+CatchTyparam.java:15:18: compiler.err.type.found.req: (compiler.misc.type.parameter: U), (compiler.misc.type.req.class)
+2 errors
--- a/test/tools/javac/generics/inference/4941882/T4941882.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/inference/4941882/T4941882.java	Thu Jul 17 11:14:39 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     4941882
  * @summary incorrect inference for result of lub(int[], float[])
- * @compile/fail T4941882.java
+ * @compile/fail/ref=T4941882.out -XDrawDiagnostics  T4941882.java
  */
 
 public class T4941882 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/4941882/T4941882.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,2 @@
+T4941882.java:13:17: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&java.io.Serializable&java.lang.Cloneable, java.lang.Object[],java.lang.Object)
+1 error
--- a/test/tools/javac/generics/inference/4972073/T4972073.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/inference/4972073/T4972073.java	Thu Jul 17 11:14:39 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * 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     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073.java
+ * @compile/fail/ref=T4972073.out -XDrawDiagnostics  T4972073.java
  */
 
 public class T4972073 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/4972073/T4972073.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,3 @@
+T4972073.java:18:80: compiler.err.repeated.interface
+T4972073.java:24:68: compiler.err.repeated.interface
+2 errors
--- a/test/tools/javac/generics/inference/4972073/T4972073a.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/inference/4972073/T4972073a.java	Thu Jul 17 11:14:39 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * 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     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073a.java
+ * @compile/fail/ref=T4972073a.out -XDrawDiagnostics  T4972073a.java
  */
 
 public class T4972073a {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/4972073/T4972073a.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,2 @@
+T4972073a.java:18:80: compiler.err.repeated.interface
+1 error
--- a/test/tools/javac/generics/inference/4972073/T4972073b.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/inference/4972073/T4972073b.java	Thu Jul 17 11:14:39 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * 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     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073b.java
+ * @compile/fail/ref=T4972073b.out -XDrawDiagnostics  T4972073b.java
  */
 
 public class T4972073b {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/4972073/T4972073b.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,2 @@
+T4972073b.java:18:68: compiler.err.repeated.interface
+1 error
--- a/test/tools/javac/generics/inference/5081782/Neg.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/inference/5081782/Neg.java	Thu Jul 17 11:14:39 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     5081782
  * @summary type arguments to non-generic methods
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg.java
+ * @compile/fail/ref=Neg.out -XDrawDiagnostics  Neg.java
  */
 
 public class Neg {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/5081782/Neg.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,8 @@
+Neg.java:12:14: compiler.err.cant.resolve.location: kindname.class, Can, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:18: compiler.err.cant.resolve.location: kindname.class, I, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:20: compiler.err.cant.resolve.location: kindname.class, write, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:26: compiler.err.cant.resolve.location: kindname.class, a, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:28: compiler.err.cant.resolve.location: kindname.class, little, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:35: compiler.err.cant.resolve.location: kindname.class, story, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:41: compiler.err.cant.resolve.location: kindname.class, here, , , (compiler.misc.location: kindname.class, Neg, null)
+7 errors
--- a/test/tools/javac/generics/rawOverride/Fail1.java	Thu Jul 17 10:17:58 2014 -0700
+++ b/test/tools/javac/generics/rawOverride/Fail1.java	Thu Jul 17 11:14:39 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * 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 5073079
  * @summary Allow unchecked override of generified methods in
  * parameterless classes
  * @author Peter von der Ah\u00e9
  *
- * @compile/fail Fail1.java
+ * @compile/fail/ref=Fail1.out -XDrawDiagnostics  Fail1.java
  */
 
 interface MyList<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/rawOverride/Fail1.out	Thu Jul 17 11:14:39 2014 -0700
@@ -0,0 +1,2 @@
+Fail1.java:21:1: compiler.err.does.not.override.abstract: C, f(MyList), A
+1 error