Add test on in-place lambda with return + safecall

Currently, diagnostics behavior is undesired. The next commit fixes it

^KT-28061 In Progress
This commit is contained in:
Dmitry Savvinov
2018-11-12 15:19:24 +03:00
parent b918786336
commit c9e87bf353
9 changed files with 218 additions and 0 deletions
@@ -817,6 +817,11 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
runTest("compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.kt");
}
@TestMetadata("safeCallAndInPlaceReturn.kt")
public void testSafeCallAndInPlaceReturn() throws Exception {
runTest("compiler/testData/cfgWithStdLib/contracts/safeCallAndInPlaceReturn.kt");
}
@TestMetadata("throwIfNotCalled.kt")
public void testThrowIfNotCalled() throws Exception {
runTest("compiler/testData/cfgWithStdLib/contracts/throwIfNotCalled.kt");
@@ -817,6 +817,11 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
runTest("compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.kt");
}
@TestMetadata("safeCallAndInPlaceReturn.kt")
public void testSafeCallAndInPlaceReturn() throws Exception {
runTest("compiler/testData/cfgWithStdLib/contracts/safeCallAndInPlaceReturn.kt");
}
@TestMetadata("throwIfNotCalled.kt")
public void testThrowIfNotCalled() throws Exception {
runTest("compiler/testData/cfgWithStdLib/contracts/throwIfNotCalled.kt");
@@ -971,6 +971,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonReturningInlinedLambda.kt");
}
@TestMetadata("safeCallAndInPlaceReturn.kt")
public void testSafeCallAndInPlaceReturn() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/safeCallAndInPlaceReturn.kt");
}
@TestMetadata("severalJumpOutsFromInlinedLambda.kt")
public void testSeveralJumpOutsFromInlinedLambda() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/severalJumpOutsFromInlinedLambda.kt");
@@ -971,6 +971,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonReturningInlinedLambda.kt");
}
@TestMetadata("safeCallAndInPlaceReturn.kt")
public void testSafeCallAndInPlaceReturn() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/safeCallAndInPlaceReturn.kt");
}
@TestMetadata("severalJumpOutsFromInlinedLambda.kt")
public void testSeveralJumpOutsFromInlinedLambda() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/severalJumpOutsFromInlinedLambda.kt");