changeset 2661:338eb81007d7

8058410: Group 10b: golden files for tests in tools/javac dir Reviewed-by: jjg
author sogoel
date Fri, 10 Oct 2014 14:41:50 -0700
parents 6a9c87edb6ff
children a65be7dd80f8
files test/tools/javac/7129225/NegTest.out test/tools/javac/7129225/NegTest.ref test/tools/javac/7129225/TestImportStar.java test/tools/javac/7129225/TestImportStar.out test/tools/javac/7129225/TestImportStar.ref test/tools/javac/QualifiedAccess/QualifiedAccess_4.java test/tools/javac/QualifiedAccess/QualifiedAccess_4.out test/tools/javac/T4848619/T4848619a.java test/tools/javac/T4848619/T4848619a.out test/tools/javac/T4848619/T4848619b.java test/tools/javac/T4848619/T4848619b.out test/tools/javac/scope/6225935/Estatico4.java test/tools/javac/scope/6225935/Estatico4.out test/tools/javac/scope/6225935/T6214959.java test/tools/javac/scope/6225935/T6214959.out test/tools/javac/warnings/DepAnn.java test/tools/javac/warnings/DepAnn.out test/tools/javac/warnings/Finally.java test/tools/javac/warnings/Finally.out test/tools/javac/warnings/Serial.java test/tools/javac/warnings/Serial.out
diffstat 21 files changed, 49 insertions(+), 254 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/NegTest.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+TestImportStar.java:14:1: compiler.err.doesnt.exist: xxx
+1 error
--- a/test/tools/javac/7129225/NegTest.ref	Thu Oct 09 19:14:30 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
-1 error
--- a/test/tools/javac/7129225/TestImportStar.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/7129225/TestImportStar.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,36 +1,11 @@
-/*
- * 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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 7129225
  * @summary import xxx.* isn't handled correctly by annotation processing
  * @library /tools/javac/lib
  * @build JavacTestingAbstractProcessor
- * @compile/fail/ref=NegTest.ref -XDrawDiagnostics TestImportStar.java
+ * @compile/fail/ref=NegTest.out -XDrawDiagnostics TestImportStar.java
  * @compile Anno.java AnnoProcessor.java
- * @compile/fail/ref=TestImportStar.ref -XDrawDiagnostics -processor AnnoProcessor -proc:only TestImportStar.java
+ * @compile/fail/ref=TestImportStar.out -XDrawDiagnostics -processor AnnoProcessor -proc:only TestImportStar.java
  */
 
  //The @compile/fail... verifies that the fix doesn't break the normal compilation of import xxx.*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/7129225/TestImportStar.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,4 @@
+- compiler.note.proc.messager: RUNNING - lastRound = false
+TestImportStar.java:14:1: compiler.err.doesnt.exist: xxx
+- compiler.note.proc.messager: RUNNING - lastRound = true
+1 error
--- a/test/tools/javac/7129225/TestImportStar.ref	Thu Oct 09 19:14:30 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-- compiler.note.proc.messager: RUNNING - lastRound = false
-TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
-- compiler.note.proc.messager: RUNNING - lastRound = true
-1 error
\ No newline at end of file
--- a/test/tools/javac/QualifiedAccess/QualifiedAccess_4.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/QualifiedAccess/QualifiedAccess_4.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,34 +1,10 @@
 /*
- * Copyright (c) 2002, 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 4094658
  * @summary Test enforcement of JLS 6.6.1 and 6.6.2 rules requiring that
  * the type to which a component member belongs be accessible in qualified
  * names.
- *
- * @compile/fail QualifiedAccess_4.java
+ * @compile/fail/ref=QualifiedAccess_4.out -XDrawDiagnostics QualifiedAccess_4.java
  */
 
 import pack1.P1;
@@ -38,8 +14,5 @@
     class Foo {
         class Bar {}
     }
-
-    // NOTE: Error localization and recovery is bad here,
-    // eliciting two other spurious complaints.
     Foo.Bar yy  = x.new Foo.Bar();      // ERROR - Type in qualified 'new' must be unqualified
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/QualifiedAccess/QualifiedAccess_4.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+QualifiedAccess_4.java:17:28: compiler.err.expected: '('
+1 error
--- a/test/tools/javac/T4848619/T4848619a.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/T4848619/T4848619a.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * 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     4848619
  * @summary static final variable declared after use and self initialized
  * @author  Peter von der Ah\u00e9
- * @compile/fail T4848619a.java
+ * @compile/fail/ref=T4848619a.out -XDrawDiagnostics T4848619a.java
  */
 
 public class T4848619a {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/T4848619/T4848619a.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+T4848619a.java:11:37: compiler.err.illegal.self.ref
+1 error
--- a/test/tools/javac/T4848619/T4848619b.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/T4848619/T4848619b.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * 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     4848619
  * @summary static final variable declared after use and self initialized
  * @author  Peter von der Ah\u00e9
- * @compile/fail T4848619b.java
+ * @compile/fail/ref=T4848619b.out -XDrawDiagnostics T4848619b.java
  */
 
 public class T4848619b {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/T4848619/T4848619b.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+T4848619b.java:11:13: compiler.err.illegal.self.ref
+1 error
--- a/test/tools/javac/scope/6225935/Estatico4.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/scope/6225935/Estatico4.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * 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     6214959
- * @summary Compiler fails do produce error message with ODD number of import static
- * @compile/fail Estatico4.java
+ * @summary Compiler fails to produce error message with ODD number of import static
+ * @compile/fail/ref=Estatico4.out -XDrawDiagnostics Estatico4.java
  */
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/scope/6225935/Estatico4.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+Estatico4.java:16:24: compiler.err.ref.ambiguous: CENTER, kindname.variable, CENTER, java.awt.FlowLayout, kindname.variable, CENTER, javax.swing.SwingConstants
+1 error
--- a/test/tools/javac/scope/6225935/T6214959.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/scope/6225935/T6214959.java	Fri Oct 10 14:41:50 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     6214959
- * @summary Compiler fails do produce error message with ODD number of import static
+ * @summary Compiler fails to produce error message with ODD number of import static
  * @author  Peter von der Ah\u00e9
- * @compile/fail T6214959.java
+ * @compile/fail/ref=T6214959.out -XDrawDiagnostics T6214959.java
  */
 
 import static a.Star.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/scope/6225935/T6214959.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+T6214959.java:15:7: compiler.err.ref.ambiguous: y, kindname.method, y(), a.Star, kindname.method, y(), a.Ambiguous
+1 error
--- a/test/tools/javac/warnings/DepAnn.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/warnings/DepAnn.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,35 +1,7 @@
 /*
- * 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 4986256
- * @compile DepAnn.java
- * @compile -Xlint:dep-ann DepAnn.java
- * @compile -Xlint:all DepAnn.java
- * @compile -Werror DepAnn.java
- * @compile/fail -Werror -Xlint:dep-ann DepAnn.java
- * @compile/fail -Werror -Xlint:all,-path DepAnn.java
+ * @compile/ref=DepAnn.out -XDrawDiagnostics -Xlint:all DepAnn.java
  */
 
 // control: this class should generate warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/warnings/DepAnn.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,5 @@
+DepAnn.java:12:10: compiler.warn.missing.deprecated.annotation
+DepAnn.java:9:1: compiler.warn.missing.deprecated.annotation
+DepAnn.java:59:10: compiler.warn.missing.deprecated.annotation
+DepAnn.java:56:1: compiler.warn.missing.deprecated.annotation
+4 warnings
--- a/test/tools/javac/warnings/Finally.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/warnings/Finally.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,35 +1,7 @@
 /*
- * 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 4986256
- * @compile Finally.java
- * @compile -Xlint:finally Finally.java
- * @compile -Xlint:all Finally.java
- * @compile -Werror Finally.java
- * @compile/fail -Werror -Xlint:finally Finally.java
- * @compile/fail -Werror -Xlint:all,-path Finally.java
+ * @compile/ref=Finally.out -XDrawDiagnostics -Xlint:all Finally.java
  */
 
 // control: this class should generate a warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/warnings/Finally.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,2 @@
+Finally.java:16:9: compiler.warn.finally.cannot.complete
+1 warning
--- a/test/tools/javac/warnings/Serial.java	Thu Oct 09 19:14:30 2014 -0700
+++ b/test/tools/javac/warnings/Serial.java	Fri Oct 10 14:41:50 2014 -0700
@@ -1,34 +1,7 @@
 /*
- * 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 4986256
- * @compile Serial.java
- * @compile -Xlint:serial Serial.java
- * @compile -Xlint:all Serial.java
- * @compile -Werror Serial.java
- * @compile/fail -Werror -Xlint:serial Serial.java
+ * @compile/ref=Serial.out -XDrawDiagnostics -Xlint:all Serial.java
  */
 
 import java.io.Serializable;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/warnings/Serial.out	Fri Oct 10 14:41:50 2014 -0700
@@ -0,0 +1,5 @@
+Serial.java:12:12: compiler.warn.missing.SVUID: Serial.Inner
+Serial.java:10:1: compiler.warn.missing.SVUID: Serial
+Serial.java:51:12: compiler.warn.missing.SVUID: Serial3.Inner
+Serial.java:49:1: compiler.warn.missing.SVUID: Serial3
+4 warnings