Add some data flow analysis tests on when
This commit is contained in:
committed by
Dmitry Petrov
parent
ae929d0f08
commit
148d03e365
@@ -22470,16 +22470,31 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/when/withSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("capturingInInitializer.kt")
|
||||
public void testCapturingInInitializer() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/capturingInInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("invisibleOutsideOfWhen.kt")
|
||||
public void testInvisibleOutsideOfWhen() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/invisibleOutsideOfWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jumpoutInInitializer.kt")
|
||||
public void testJumpoutInInitializer() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/jumpoutInInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedWhenWithSubject.kt")
|
||||
public void testNestedWhenWithSubject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/nestedWhenWithSubject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noSubjectVariableName.kt")
|
||||
public void testNoSubjectVariableName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/noSubjectVariableName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reassignmentToWhenSubjectVariable.kt")
|
||||
public void testReassignmentToWhenSubjectVariable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/reassignmentToWhenSubjectVariable.kt");
|
||||
@@ -22500,6 +22515,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastsOnSubjectVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("smartcastToEnum.kt")
|
||||
public void testSmartcastToEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartcastToEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("subjectVariableInIsPattern.kt")
|
||||
public void testSubjectVariableInIsPattern() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
|
||||
|
||||
Generated
+20
@@ -22470,16 +22470,31 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/when/withSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("capturingInInitializer.kt")
|
||||
public void testCapturingInInitializer() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/capturingInInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("invisibleOutsideOfWhen.kt")
|
||||
public void testInvisibleOutsideOfWhen() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/invisibleOutsideOfWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jumpoutInInitializer.kt")
|
||||
public void testJumpoutInInitializer() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/jumpoutInInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedWhenWithSubject.kt")
|
||||
public void testNestedWhenWithSubject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/nestedWhenWithSubject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noSubjectVariableName.kt")
|
||||
public void testNoSubjectVariableName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/noSubjectVariableName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reassignmentToWhenSubjectVariable.kt")
|
||||
public void testReassignmentToWhenSubjectVariable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/reassignmentToWhenSubjectVariable.kt");
|
||||
@@ -22500,6 +22515,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartCastsOnSubjectVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("smartcastToEnum.kt")
|
||||
public void testSmartcastToEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/smartcastToEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("subjectVariableInIsPattern.kt")
|
||||
public void testSubjectVariableInIsPattern() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/when/withSubjectVariable/subjectVariableInIsPattern.kt");
|
||||
|
||||
Reference in New Issue
Block a user