Minor: fix & reformat after rebase

This commit is contained in:
Dmitry Petrov
2018-06-05 15:52:28 +03:00
parent 8aec99f4b5
commit c691d64ea8
5 changed files with 131 additions and 127 deletions
@@ -22462,62 +22462,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class WithSubjectVariable extends AbstractDiagnosticsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInWithSubjectVariable() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/when/withSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("invisibleOutsideOfWhen.kt")
public void testInvisibleOutsideOfWhen() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/invisibleOutsideOfWhen.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/invisibleOutsideOfWhen.kt");
}
@TestMetadata("reassignmentToWhenSubjectVariable.kt")
public void testReassignmentToWhenSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/reassignmentToWhenSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/reassignmentToWhenSubjectVariable.kt");
}
@TestMetadata("shadowingOtherVariable.kt")
public void testShadowingOtherVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/shadowingOtherVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/shadowingOtherVariable.kt");
}
@TestMetadata("smartCastOnValueBoundToSubjectVariable.kt")
public void testSmartCastOnValueBoundToSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastOnValueBoundToSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastOnValueBoundToSubjectVariable.kt");
}
@TestMetadata("smartCastsOnSubjectVariable.kt")
public void testSmartCastsOnSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastsOnSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastsOnSubjectVariable.kt");
}
@TestMetadata("subjectVariableInIsPattern.kt")
public void testSubjectVariableInIsPattern() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedFeature.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedFeature.kt");
}
@TestMetadata("unsupportedVariableDeclarationsInWhenSubject.kt")
public void testUnsupportedVariableDeclarationsInWhenSubject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedVariableDeclarationsInWhenSubject.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedVariableDeclarationsInWhenSubject.kt");
}
@TestMetadata("unusedWhenSubjectVariable.kt")
public void testUnusedWhenSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/unusedWhenSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unusedWhenSubjectVariable.kt");
}
}
}
@@ -22462,62 +22462,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class WithSubjectVariable extends AbstractDiagnosticsUsingJavacTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInWithSubjectVariable() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/when/withSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("invisibleOutsideOfWhen.kt")
public void testInvisibleOutsideOfWhen() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/invisibleOutsideOfWhen.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/invisibleOutsideOfWhen.kt");
}
@TestMetadata("reassignmentToWhenSubjectVariable.kt")
public void testReassignmentToWhenSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/reassignmentToWhenSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/reassignmentToWhenSubjectVariable.kt");
}
@TestMetadata("shadowingOtherVariable.kt")
public void testShadowingOtherVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/shadowingOtherVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/shadowingOtherVariable.kt");
}
@TestMetadata("smartCastOnValueBoundToSubjectVariable.kt")
public void testSmartCastOnValueBoundToSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastOnValueBoundToSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastOnValueBoundToSubjectVariable.kt");
}
@TestMetadata("smartCastsOnSubjectVariable.kt")
public void testSmartCastsOnSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastsOnSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastsOnSubjectVariable.kt");
}
@TestMetadata("subjectVariableInIsPattern.kt")
public void testSubjectVariableInIsPattern() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
}
@TestMetadata("unsupportedFeature.kt")
public void testUnsupportedFeature() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedFeature.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedFeature.kt");
}
@TestMetadata("unsupportedVariableDeclarationsInWhenSubject.kt")
public void testUnsupportedVariableDeclarationsInWhenSubject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedVariableDeclarationsInWhenSubject.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unsupportedVariableDeclarationsInWhenSubject.kt");
}
@TestMetadata("unusedWhenSubjectVariable.kt")
public void testUnusedWhenSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable/unusedWhenSubjectVariable.kt");
doTest(fileName);
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/unusedWhenSubjectVariable.kt");
}
}
}
@@ -713,14 +713,12 @@ public class ParsingTestGenerated extends AbstractParsingTest {
@TestMetadata("WhenWithSubjectVariable.kt")
public void testWhenWithSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/WhenWithSubjectVariable.kt");
doParsingTest(fileName);
runTest("compiler/testData/psi/WhenWithSubjectVariable.kt");
}
@TestMetadata("WhenWithSubjectVariable_ERR.kt")
public void testWhenWithSubjectVariable_ERR() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/WhenWithSubjectVariable_ERR.kt");
doParsingTest(fileName);
runTest("compiler/testData/psi/WhenWithSubjectVariable_ERR.kt");
}
@TestMetadata("When_ERR.kt")