8044080: .out files for unicode, implicitThis and importChecks tests in tools/javac dir
authorsogoel
Mon, 07 Jul 2014 13:39:31 -0700
changeset 25439 26d6d07eebc7
parent 25438 fa59de4df4bf
child 25440 7f9cedf2e88d
8044080: .out files for unicode, implicitThis and importChecks tests in tools/javac dir Reviewed-by: jjg
langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed.java
langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed.out
langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed2.java
langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed2.out
langtools/test/tools/javac/importChecks/ImportCanonical1.java
langtools/test/tools/javac/importChecks/ImportCanonical1.out
langtools/test/tools/javac/importChecks/ImportIsFullyQualified.java
langtools/test/tools/javac/importChecks/ImportIsFullyQualified.out
langtools/test/tools/javac/importChecks/InvalidImportsNoClasses.java
langtools/test/tools/javac/importChecks/InvalidImportsNoClasses.out
langtools/test/tools/javac/unicode/NonasciiDigit.java
langtools/test/tools/javac/unicode/NonasciiDigit.out
langtools/test/tools/javac/unicode/NonasciiDigit2.java
langtools/test/tools/javac/unicode/NonasciiDigit2.out
langtools/test/tools/javac/unicode/SupplementaryJavaID2.java
langtools/test/tools/javac/unicode/SupplementaryJavaID2.out
langtools/test/tools/javac/unicode/SupplementaryJavaID3.java
langtools/test/tools/javac/unicode/SupplementaryJavaID3.out
langtools/test/tools/javac/unicode/TripleQuote.java
langtools/test/tools/javac/unicode/TripleQuote.out
--- a/langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 1999, 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 4249111
  * @summary 'new' of inner class should not be allowed unless outer is constructed
  *
- * @compile/fail NewBeforeOuterConstructed.java
+ * @compile/fail/ref=NewBeforeOuterConstructed.out -XDrawDiagnostics  NewBeforeOuterConstructed.java
  */
 
 import java.io.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+NewBeforeOuterConstructed.java:27:21: compiler.err.cant.ref.before.ctor.called: this
+1 error
--- a/langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed2.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed2.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * 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 4689058
  * @summary unverifiable code for implicit outer in super constructor call
  *
- * @compile/fail NewBeforeOuterConstructed2.java
+ * @compile/fail/ref=NewBeforeOuterConstructed2.out -XDrawDiagnostics  NewBeforeOuterConstructed2.java
  */
 
 public class NewBeforeOuterConstructed2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/implicitThis/NewBeforeOuterConstructed2.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+NewBeforeOuterConstructed2.java:20:35: compiler.err.cant.ref.before.ctor.called: this
+1 error
--- a/langtools/test/tools/javac/importChecks/ImportCanonical1.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/importChecks/ImportCanonical1.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,33 +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 4462745
  * @summary compiler permits to import class given by its non-canonical name
  * @author gafter
  *
- * @compile/fail ImportCanonical1.java ImportCanonical2.java
+ * @compile/fail/ref=ImportCanonical1.out -XDrawDiagnostics  ImportCanonical1.java ImportCanonical2.java
  */
 
 package p1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importChecks/ImportCanonical1.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+ImportCanonical2.java:25:13: compiler.err.import.requires.canonical: p1.A1.I
+1 error
--- a/langtools/test/tools/javac/importChecks/ImportIsFullyQualified.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/importChecks/ImportIsFullyQualified.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2000, 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 4335264
  * @summary Verify that import-on-demand must be fully qualified.
  * @author maddox
  *
- * @compile/fail ImportIsFullyQualified.java
+ * @compile/fail/ref=ImportIsFullyQualified.out -XDrawDiagnostics  ImportIsFullyQualified.java
  */
 
 import java.awt.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importChecks/ImportIsFullyQualified.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+ImportIsFullyQualified.java:11:1: compiler.err.doesnt.exist: JobAttributes
+1 error
--- a/langtools/test/tools/javac/importChecks/InvalidImportsNoClasses.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/importChecks/InvalidImportsNoClasses.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2000, 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 4312063
  * @summary Verify that nonexistent imports detected when no classes declared in compilation unit.
  * @author maddox
  *
- * @compile/fail InvalidImportsNoClasses.java
+ * @compile/fail/ref=InvalidImportsNoClasses.out -XDrawDiagnostics  InvalidImportsNoClasses.java
  */
 
 import nonexistent.pack.cls;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importChecks/InvalidImportsNoClasses.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+InvalidImportsNoClasses.java:10:24: compiler.err.doesnt.exist: nonexistent.pack
+1 error
--- a/langtools/test/tools/javac/unicode/NonasciiDigit.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/unicode/NonasciiDigit.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2002, 2005, 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 4707960 6183529
  * @summary javac accepts unicode digits - sometimes crashing
  * @author gafter
  *
- * @compile/fail NonasciiDigit.java
+ * @compile/fail/ref=NonasciiDigit.out -XDrawDiagnostics  NonasciiDigit.java
  */
 public class NonasciiDigit {
     public static void main(String[] args) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/unicode/NonasciiDigit.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+NonasciiDigit.java:12:26: compiler.err.illegal.char: \uff11
+1 error
--- a/langtools/test/tools/javac/unicode/NonasciiDigit2.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/unicode/NonasciiDigit2.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2005, 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 4707960 6183529
  * @summary javac accepts unicode digits - sometimes crashing
  * @author gafter
  *
- * @compile/fail NonasciiDigit2.java
+ * @compile/fail/ref=NonasciiDigit2.out -XDrawDiagnostics  NonasciiDigit2.java
  */
 public class NonasciiDigit2 {
     public static void main(String[] args) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/unicode/NonasciiDigit2.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+NonasciiDigit2.java:12:18: compiler.err.illegal.nonascii.digit
+1 error
--- a/langtools/test/tools/javac/unicode/SupplementaryJavaID2.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/unicode/SupplementaryJavaID2.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * 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 4914724
  * @summary Ensure that the invalid surrogate sequence, as the start of an identifier,
  *          causes a compilation failure
  * @author Naoto Sato
  *
- * @compile/fail SupplementaryJavaID2.java
+ * @compile/fail/ref=SupplementaryJavaID2.out -XDrawDiagnostics  SupplementaryJavaID2.java
  */
 
 public class SupplementaryJavaID2 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/unicode/SupplementaryJavaID2.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,3 @@
+SupplementaryJavaID2.java:12:14: compiler.err.illegal.char: \ud801
+SupplementaryJavaID2.java:12:24: compiler.err.expected: token.identifier
+2 errors
--- a/langtools/test/tools/javac/unicode/SupplementaryJavaID3.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/unicode/SupplementaryJavaID3.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * 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 4914724
  * @summary Ensure that the invalid surrogate sequence, as the part of an identifier,
  *          causes a compilation failure
  * @author Naoto Sato
  *
- * @compile/fail SupplementaryJavaID3.java
+ * @compile/fail/ref=SupplementaryJavaID3.out -XDrawDiagnostics  SupplementaryJavaID3.java
  */
 
 public class SupplementaryJavaID3 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/unicode/SupplementaryJavaID3.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,2 @@
+SupplementaryJavaID3.java:12:23: compiler.err.illegal.char: \ud801
+1 error
--- a/langtools/test/tools/javac/unicode/TripleQuote.java	Mon Jul 07 12:55:00 2014 -0700
+++ b/langtools/test/tools/javac/unicode/TripleQuote.java	Mon Jul 07 13:39:31 2014 -0700
@@ -1,36 +1,14 @@
 /*
- * Copyright (c) 1997, 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 1265387
  * @summary ''' and '\u0027' are not legal char literals.
  * @author turnidge
  *
- * @compile/fail TripleQuote.java
+ * @compile/fail/ref=TripleQuote.out -XDrawDiagnostics  TripleQuote.java
  */
 
 public
 class TripleQuote {
     char c = '\u0027';
+    char d = ''';
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/unicode/TripleQuote.out	Mon Jul 07 13:39:31 2014 -0700
@@ -0,0 +1,7 @@
+TripleQuote.java:12:14: compiler.err.empty.char.lit
+TripleQuote.java:12:20: compiler.err.empty.char.lit
+TripleQuote.java:12:21: compiler.err.unclosed.char.lit
+TripleQuote.java:13:14: compiler.err.empty.char.lit
+TripleQuote.java:13:15: compiler.err.empty.char.lit
+TripleQuote.java:13:16: compiler.err.unclosed.char.lit
+6 errors