Support 'when' with subject variable in JVM BE
This commit is contained in:
+33
@@ -21650,5 +21650,38 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/when/stringOptimization/statement.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/when/whenSubjectVariable")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class WhenSubjectVariable extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInWhenSubjectVariable() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/whenSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("captureSubjectVariable.kt")
|
||||
public void testCaptureSubjectVariable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/captureSubjectVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("equalityWithSubjectVariable.kt")
|
||||
public void testEqualityWithSubjectVariable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/equalityWithSubjectVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("isCheckOnSubjectVariable.kt")
|
||||
public void testIsCheckOnSubjectVariable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/isCheckOnSubjectVariable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rangeCheckOnSubjectVariable.kt")
|
||||
public void testRangeCheckOnSubjectVariable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user