Support subject variable in specialized code generators for 'when'

This commit is contained in:
Dmitry Petrov
2018-06-09 17:00:25 +03:00
parent 3528405666
commit 34b76a3718
17 changed files with 427 additions and 20 deletions
@@ -21649,6 +21649,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testStatement() throws Exception {
runTest("compiler/testData/codegen/box/when/stringOptimization/statement.kt");
}
@TestMetadata("temporaryVarInWhenByStringIsDisposedProperly.kt")
public void testTemporaryVarInWhenByStringIsDisposedProperly() throws Exception {
runTest("compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/when/whenSubjectVariable")
@@ -21668,6 +21673,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/captureSubjectVariable.kt");
}
@TestMetadata("denseIntSwitchWithSubjectVariable.kt")
public void testDenseIntSwitchWithSubjectVariable() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt");
}
@TestMetadata("equalityWithSubjectVariable.kt")
public void testEqualityWithSubjectVariable() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/equalityWithSubjectVariable.kt");
@@ -21692,6 +21702,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testRangeCheckOnSubjectVariable() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt");
}
@TestMetadata("sparseIntSwitchWithSubjectVariable.kt")
public void testSparseIntSwitchWithSubjectVariable() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt");
}
@TestMetadata("whenByEnum.kt")
public void testWhenByEnum() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/whenByEnum.kt");
}
@TestMetadata("whenByNullableEnum.kt")
public void testWhenByNullableEnum() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt");
}
@TestMetadata("whenByString.kt")
public void testWhenByString() throws Exception {
runTest("compiler/testData/codegen/box/when/whenSubjectVariable/whenByString.kt");
}
}
}
}