8074387: Group 11: golden files for coin tests in tools/javac dir
Reviewed-by: jjg
This commit is contained in:
parent
190ba196a0
commit
6b7d074037
@ -2,7 +2,7 @@
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6827009
|
||||
* @summary Check for case labels of different types.
|
||||
* @compile/fail -source 6 BadlyTypedLabel1.java
|
||||
* @compile/fail/ref=BadlyTypedLabel1_6.out -XDrawDiagnostics -source 6 BadlyTypedLabel1.java
|
||||
* @compile/fail/ref=BadlyTypedLabel1.out -XDrawDiagnostics BadlyTypedLabel1.java
|
||||
*/
|
||||
class BadlyTypedLabel1 {
|
||||
|
@ -0,0 +1,6 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
BadlyTypedLabel1.java:10:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
1 error
|
||||
3 warnings
|
@ -2,7 +2,7 @@
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6827009
|
||||
* @summary Check for case lables of different types.
|
||||
* @compile/fail -source 6 BadlyTypedLabel2.java
|
||||
* @compile/fail/ref=BadlyTypedLabel2_6.out -XDrawDiagnostics -source 6 BadlyTypedLabel2.java
|
||||
* @compile/fail/ref=BadlyTypedLabel2.out -XDrawDiagnostics BadlyTypedLabel2.java
|
||||
*/
|
||||
import static java.math.RoundingMode.*;
|
||||
|
@ -0,0 +1,7 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
BadlyTypedLabel2.java:12:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
BadlyTypedLabel2.java:15:14: compiler.err.const.expr.req
|
||||
2 errors
|
||||
3 warnings
|
@ -2,7 +2,7 @@
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6827009
|
||||
* @summary Check for non-constant case labels.
|
||||
* @compile/fail -source 6 NonConstantLabel.java
|
||||
* @compile/fail/ref=NonConstantLabel6.out -XDrawDiagnostics -source 6 NonConstantLabel.java
|
||||
* @compile/fail/ref=NonConstantLabel.out -XDrawDiagnostics NonConstantLabel.java
|
||||
*/
|
||||
class NonConstantLabel {
|
||||
|
@ -0,0 +1,7 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
NonConstantLabel.java:11:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
NonConstantLabel.java:14:14: compiler.err.const.expr.req
|
||||
2 errors
|
||||
3 warnings
|
@ -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/
|
||||
* @bug 6827009
|
||||
* @summary Positive tests for strings in switch with few alternatives.
|
||||
* @compile/fail -source 6 OneCaseSwitches.java
|
||||
* @compile OneCaseSwitches.java
|
||||
* @compile/fail/ref=OneCaseSwitches.out -XDrawDiagnostics -source 6 OneCaseSwitches.java
|
||||
* @compile OneCaseSwitches.java
|
||||
* @run main OneCaseSwitches
|
||||
* @author Joseph D. Darcy
|
||||
*/
|
||||
|
@ -0,0 +1,14 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
OneCaseSwitches.java:23:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:33:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:52:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:66:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:85:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:99:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:119:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:130:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
OneCaseSwitches.java:242:16: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
9 errors
|
||||
3 warnings
|
7
langtools/test/tools/javac/StringsInSwitch/RSCL1_6.out
Normal file
7
langtools/test/tools/javac/StringsInSwitch/RSCL1_6.out
Normal file
@ -0,0 +1,7 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
RepeatedStringCaseLabels1.java:10:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
RepeatedStringCaseLabels1.java:13:9: compiler.err.duplicate.case.label
|
||||
2 errors
|
||||
3 warnings
|
7
langtools/test/tools/javac/StringsInSwitch/RSCL2_6.out
Normal file
7
langtools/test/tools/javac/StringsInSwitch/RSCL2_6.out
Normal file
@ -0,0 +1,7 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
RepeatedStringCaseLabels2.java:11:15: compiler.err.string.switch.not.supported.in.source: 1.6
|
||||
RepeatedStringCaseLabels2.java:14:9: compiler.err.duplicate.case.label
|
||||
2 errors
|
||||
3 warnings
|
@ -2,7 +2,7 @@
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6827009
|
||||
* @summary Check for repeated string case labels.
|
||||
* @compile/fail -source 6 RepeatedStringCaseLabels1.java
|
||||
* @compile/fail/ref=RSCL1_6.out -XDrawDiagnostics -source 6 RepeatedStringCaseLabels1.java
|
||||
* @compile/fail/ref=RSCL1.out -XDrawDiagnostics RepeatedStringCaseLabels1.java
|
||||
*/
|
||||
class RepeatedStringCaseLabels1 {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6827009
|
||||
* @summary Check for repeated string case labels.
|
||||
* @compile/fail -source 6 RepeatedStringCaseLabels2.java
|
||||
* @compile/fail/ref=RSCL2_6.out -XDrawDiagnostics -source 6 RepeatedStringCaseLabels2.java
|
||||
* @compile/fail/ref=RSCL2.out -XDrawDiagnostics RepeatedStringCaseLabels2.java
|
||||
*/
|
||||
class RepeatedStringCaseLabels2 {
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @bug 6911256 6964740
|
||||
* @author Joseph D. Darcy
|
||||
* @summary Verify bad TWRs don't compile
|
||||
* @compile/fail -source 6 TwrFlow.java
|
||||
* @compile/fail/ref=BadTwr6.out -XDrawDiagnostics -source 6 BadTwr.java
|
||||
* @compile/fail/ref=BadTwr.out -XDrawDiagnostics BadTwr.java
|
||||
*/
|
||||
|
||||
|
6
langtools/test/tools/javac/TryWithResources/BadTwr6.out
Normal file
6
langtools/test/tools/javac/TryWithResources/BadTwr6.out
Normal file
@ -0,0 +1,6 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
BadTwr.java:13:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
|
||||
1 error
|
||||
3 warnings
|
@ -3,7 +3,7 @@
|
||||
* @bug 6911256 6964740
|
||||
* @author Joseph D. Darcy
|
||||
* @summary Verify bad TWRs don't compile
|
||||
* @compile/fail -source 6 BadTwrSyntax.java
|
||||
* @compile/fail/ref=BadTwrSyntax6.out -XDrawDiagnostics -source 6 BadTwrSyntax.java
|
||||
* @compile/fail/ref=BadTwrSyntax.out -XDrawDiagnostics BadTwrSyntax.java
|
||||
*/
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
BadTwrSyntax.java:14:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
|
||||
BadTwrSyntax.java:14:43: compiler.err.illegal.start.of.expr
|
||||
2 errors
|
||||
3 warnings
|
@ -3,7 +3,7 @@
|
||||
* @bug 6911256 6964740 7013420
|
||||
* @author Joseph D. Darcy
|
||||
* @summary Verify invalid TWR block is not accepted.
|
||||
* @compile/fail -source 6 TwrOnNonResource.java
|
||||
* @compile/fail/ref=TwrOnNonResource6.out -XDrawDiagnostics -source 6 TwrOnNonResource.java
|
||||
* @compile/fail/ref=TwrOnNonResource.out -XDrawDiagnostics TwrOnNonResource.java
|
||||
*/
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
TwrOnNonResource.java:12:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
|
||||
1 error
|
||||
3 warnings
|
@ -1,32 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 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 6911256 6964740
|
||||
* @author Joseph D. Darcy
|
||||
* @summary Strange TWRs
|
||||
* @compile/fail -source 6 WeirdTwr.java
|
||||
* @compile/fail/ref=WeirdTwr.out -XDrawDiagnostics -source 6 WeirdTwr.java
|
||||
* @compile WeirdTwr.java
|
||||
* @run main WeirdTwr
|
||||
*/
|
||||
|
6
langtools/test/tools/javac/TryWithResources/WeirdTwr.out
Normal file
6
langtools/test/tools/javac/TryWithResources/WeirdTwr.out
Normal file
@ -0,0 +1,6 @@
|
||||
- compiler.warn.source.no.bootclasspath: 1.6
|
||||
- compiler.warn.option.obsolete.source: 1.6
|
||||
- compiler.warn.option.obsolete.suppression
|
||||
WeirdTwr.java:14:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
|
||||
1 error
|
||||
3 warnings
|
Loading…
Reference in New Issue
Block a user