Mercurial > hg > jdk9-shenandoah > langtools
changeset 2916:74c005554da4
8068464: Group 10d: golden files for tests in tools/javac dir
Reviewed-by: jjg
line wrap: on
line diff
--- a/test/tools/javac/ClassCycle/ClassCycle1a.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/ClassCycle/ClassCycle1a.java Fri May 15 01:09:51 2015 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2001, 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 4500240 * @summary javac throws StackOverflowError for recursive inheritance * * @compile ClassCycle1a.java - * @compile/fail ClassCycle1b.java + * @compile/fail/ref=ClassCycle1a.out -XDrawDiagnostics ClassCycle1b.java */ interface ClassCycle1b {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/ClassCycle/ClassCycle1a.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +ClassCycle1b.java:28:1: compiler.err.cyclic.inheritance: ClassCycle1b +1 error
--- a/test/tools/javac/ClassCycle/ClassCycle1b.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/ClassCycle/ClassCycle1b.java Fri May 15 01:09:51 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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
--- a/test/tools/javac/ClassCycle/ClassCycle2a.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/ClassCycle/ClassCycle2a.java Fri May 15 01:09:51 2015 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2001, 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 4500240 * @summary javac throws StackOverflowError for recursive inheritance * * @compile ClassCycle2a.java - * @compile/fail ClassCycle2b.java + * @compile/fail/ref=ClassCycle2a.out -XDrawDiagnostics ClassCycle2b.java */ class ClassCycle2b {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/ClassCycle/ClassCycle2a.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +ClassCycle2b.java:28:1: compiler.err.cyclic.inheritance: ClassCycle2b +1 error
--- a/test/tools/javac/ClassCycle/ClassCycle2b.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/ClassCycle/ClassCycle2b.java Fri May 15 01:09:51 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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
--- a/test/tools/javac/ClassCycle/ClassCycle3a.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/ClassCycle/ClassCycle3a.java Fri May 15 01:09:51 2015 -0700 @@ -1,33 +1,10 @@ /* - * Copyright (c) 2001, 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 4497044 * @summary java.lang.StackOverflowError for cyclic inheritance * * @compile ClassCycle3a.java - * @compile/fail ClassCycle3b.java + * @compile/fail/ref=ClassCycle3a.out -XDrawDiagnostics ClassCycle3b.java */ interface ClassCycle3b {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/ClassCycle/ClassCycle3a.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +ClassCycle3b.java:28:1: compiler.err.cyclic.inheritance: ClassCycle3b +1 error
--- a/test/tools/javac/ClassCycle/ClassCycle3b.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/ClassCycle/ClassCycle3b.java Fri May 15 01:09:51 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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
--- a/test/tools/javac/IllegalAnnotation.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/IllegalAnnotation.java Fri May 15 01:09:51 2015 -0700 @@ -3,8 +3,7 @@ * @bug 5012028 6384539 * @summary javac crash when declare an annotation type illegally * - * @compile/fail IllegalAnnotation.java - * @compile/fail/ref=IllegalAnnotation.out -XDdev -XDrawDiagnostics IllegalAnnotation.java + * @compile/fail/ref=IllegalAnnotation.out -XDrawDiagnostics IllegalAnnotation.java */ class IllegalAnnotation { {
--- a/test/tools/javac/IllegalAnnotation.out Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/IllegalAnnotation.out Fri May 15 01:09:51 2015 -0700 @@ -1,2 +1,2 @@ -IllegalAnnotation.java:11:10: compiler.err.intf.not.allowed.here +IllegalAnnotation.java:10:10: compiler.err.intf.not.allowed.here 1 error
--- a/test/tools/javac/NonAmbiguousField/Test.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/NonAmbiguousField/Test.java Fri May 15 01:09:51 2015 -0700 @@ -1,10 +1,33 @@ +/* + * Copyright (c) 1998, 2015, 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 4053724 * @summary Certain non-ambiguous field references were reported by the - * compiler as ambigous. + * compiler as ambiguous. * @author turnidge * * @compile one/Parent.java two/Child.java - * @compile/fail one/Parent2.java two/Child2.java + * @compile/fail/ref=Test.out -XDrawDiagnostics one/Parent2.java two/Child2.java */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/NonAmbiguousField/Test.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +Child2.java:11:28: compiler.err.ref.ambiguous: i, kindname.variable, i, one.Parent2, kindname.variable, i, two.I +1 error
--- a/test/tools/javac/NonAmbiguousField/two/Child2.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/NonAmbiguousField/two/Child2.java Fri May 15 01:09:51 2015 -0700 @@ -1,25 +1,4 @@ -/* - * Copyright (c) 1998, 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. - * - * 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. - */ +/* /nodynamiccopyright/ */ package two;
--- a/test/tools/javac/T6794959.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/T6794959.java Fri May 15 01:09:51 2015 -0700 @@ -1,34 +1,11 @@ /* - * Copyright (c) 2009, 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 6794959 * @summary add new switch -XDexpectKeys=key,key,... * @compile T6794959.java - * @compile/fail -XDfailcomplete=java.lang.String T6794959.java + * @compile/fail/ref=T6794959a.out -XDrawDiagnostics -XDfailcomplete=java.lang.String T6794959.java * @compile -XDfailcomplete=java.lang.String -XDexpectKeys=compiler.err.cant.resolve.location T6794959.java - * @compile/fail -XDexpectKeys=compiler.err.cant.resolve.location T6794959.java + * @compile/fail/ref=T6794959b.out -XDrawDiagnostics -XDexpectKeys=compiler.err.cant.resolve.location T6794959.java */ class T6794959 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/T6794959a.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +T6794959.java:12:5: compiler.err.cant.resolve.location: kindname.class, String, , , (compiler.misc.location: kindname.class, T6794959, null) +1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/T6794959b.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,1 @@ +expected diagnostic keys not found: [compiler.err.cant.resolve.location]
--- a/test/tools/javac/cast/4916620/T4916620.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/cast/4916620/T4916620.java Fri May 15 01:09:51 2015 -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 4916620 * @summary legal cast is rejected * @author Christian Plesner Hansen - * @compile/fail -Xlint:unchecked -Werror T4916620.java + * @compile/ref=T4916620.out -XDrawDiagnostics -Xlint:unchecked T4916620.java * @compile -Xlint:unchecked T4916620.java */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/cast/4916620/T4916620.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +T4916620.java:17:33: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T4916620.BB<compiler.misc.type.captureof: 1, ? extends java.lang.Number,compiler.misc.type.captureof: 2, ? super java.lang.Integer>, T4916620.BD<java.lang.Number> +1 warning
--- a/test/tools/javac/cast/6295056/T6295056.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/cast/6295056/T6295056.java Fri May 15 01:09:51 2015 -0700 @@ -1,34 +1,10 @@ /* - * 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 6295056 * @summary Unchecked cast not reported as unsafe - * @compile/fail -Xlint:unchecked -Werror T6295056.java + * @compile/ref=T6295056.out -XDrawDiagnostics -Xlint:unchecked T6295056.java * @compile T6295056.java */ - public class T6295056 { interface Foo {} interface Bar<X> {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/cast/6295056/T6295056.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +T6295056.java:13:29: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6295056.Foo, T6295056.Bar<java.lang.Object> +1 warning
--- a/test/tools/javac/cast/6467183/T6467183b.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/cast/6467183/T6467183b.java Fri May 15 01:09:51 2015 -0700 @@ -1,32 +1,9 @@ /* - * Copyright (c) 2009, 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/ * @author mcimadamore * @bug 6467183 - * @summary - * @compile/fail -Xlint:unchecked -Werror -XDrawDiagnostics T6467183b.java + * @summary unchecked warning on cast of parameterized generic subclass + * @compile/ref=T6467183b.out -XDrawDiagnostics -Xlint:unchecked T6467183b.java */ class T6665356b<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/cast/6467183/T6467183b.out Fri May 15 01:09:51 2015 -0700 @@ -0,0 +1,2 @@ +T6467183b.java:15:42: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6665356b<T>.A<compiler.misc.type.captureof: 1, ? extends java.lang.Number>, T6665356b<T>.B<? extends java.lang.Integer> +1 warning
--- a/test/tools/javac/unicode/Unmappable.java Thu May 14 20:17:02 2015 -0700 +++ b/test/tools/javac/unicode/Unmappable.java Fri May 15 01:09:51 2015 -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 4767128 5048557 5048773 * @summary diagnose encoding errors in Java source files * @author gafter * - * @compile/fail -encoding ascii Unmappable.java + * @compile/fail/ref=Unmappable.out -XDrawDiagnostics -encoding ascii Unmappable.java */ // example from 4766897