8058410: Group 10b: golden files for tests in tools/javac dir
Reviewed-by: jjg
This commit is contained in:
parent
4f08e490bb
commit
a7b8ca6209
2
langtools/test/tools/javac/7129225/NegTest.out
Normal file
2
langtools/test/tools/javac/7129225/NegTest.out
Normal file
@ -0,0 +1,2 @@
|
||||
TestImportStar.java:14:1: compiler.err.doesnt.exist: xxx
|
||||
1 error
|
@ -1,2 +0,0 @@
|
||||
TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
|
||||
1 error
|
@ -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.*
|
||||
|
@ -1,4 +1,4 @@
|
||||
- compiler.note.proc.messager: RUNNING - lastRound = false
|
||||
TestImportStar.java:39:1: compiler.err.doesnt.exist: xxx
|
||||
TestImportStar.java:14:1: compiler.err.doesnt.exist: xxx
|
||||
- compiler.note.proc.messager: RUNNING - lastRound = true
|
||||
1 error
|
||||
1 error
|
@ -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 CMain {
|
||||
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
|
||||
}
|
||||
|
@ -0,0 +1,2 @@
|
||||
QualifiedAccess_4.java:17:28: compiler.err.expected: '('
|
||||
1 error
|
@ -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 {
|
||||
|
2
langtools/test/tools/javac/T4848619/T4848619a.out
Normal file
2
langtools/test/tools/javac/T4848619/T4848619a.out
Normal file
@ -0,0 +1,2 @@
|
||||
T4848619a.java:11:37: compiler.err.illegal.self.ref
|
||||
1 error
|
@ -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 {
|
||||
|
2
langtools/test/tools/javac/T4848619/T4848619b.out
Normal file
2
langtools/test/tools/javac/T4848619/T4848619b.out
Normal file
@ -0,0 +1,2 @@
|
||||
T4848619b.java:11:13: compiler.err.illegal.self.ref
|
||||
1 error
|
@ -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
|
||||
*/
|
||||
|
||||
|
||||
|
2
langtools/test/tools/javac/scope/6225935/Estatico4.out
Normal file
2
langtools/test/tools/javac/scope/6225935/Estatico4.out
Normal file
@ -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
|
@ -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.*;
|
||||
|
2
langtools/test/tools/javac/scope/6225935/T6214959.out
Normal file
2
langtools/test/tools/javac/scope/6225935/T6214959.out
Normal file
@ -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
|
@ -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
|
||||
|
5
langtools/test/tools/javac/warnings/DepAnn.out
Normal file
5
langtools/test/tools/javac/warnings/DepAnn.out
Normal file
@ -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
|
@ -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
|
||||
|
2
langtools/test/tools/javac/warnings/Finally.out
Normal file
2
langtools/test/tools/javac/warnings/Finally.out
Normal file
@ -0,0 +1,2 @@
|
||||
Finally.java:16:9: compiler.warn.finally.cannot.complete
|
||||
1 warning
|
@ -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;
|
||||
|
5
langtools/test/tools/javac/warnings/Serial.out
Normal file
5
langtools/test/tools/javac/warnings/Serial.out
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user