New smap test
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
res = "OK"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//lambda.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambda.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 lambda.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,46:1
|
||||
//4#2:47
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//lambda.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambda.2.kt
|
||||
//builders/BuildersPackage$lambda_2$HASH$call$1
|
||||
//+ 2 lambda.1.kt
|
||||
//_DefaultPackage$lambda_1$HASH
|
||||
//*L
|
||||
//1#1,18:1
|
||||
//8#2:19
|
||||
//*E
|
||||
@@ -0,0 +1,18 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return {
|
||||
init()
|
||||
}()
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//lambda.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambda.2.kt
|
||||
//builders/BuildersPackage$lambda_2$HASH$call$1
|
||||
//*L
|
||||
//1#1,18:1
|
||||
//*E
|
||||
@@ -0,0 +1,34 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
{
|
||||
res = "OK"
|
||||
}()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//lambdaOnCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambdaOnCallSite.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 lambdaOnCallSite.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,34:1
|
||||
//4#2:35
|
||||
//*E
|
||||
@@ -0,0 +1,7 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
@@ -0,0 +1,56 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
{
|
||||
res = "OK"
|
||||
}()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
//TODO SHOULD BE LESS
|
||||
|
||||
//SMAP
|
||||
//lambdaOnInlineCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambdaOnInlineCallSite.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 lambdaOnInlineCallSite.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,56:1
|
||||
//4#2:57
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//lambdaOnInlineCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambdaOnInlineCallSite.1.kt
|
||||
//_DefaultPackage$lambdaOnInlineCallSite_1$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,56:1
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//lambdaOnInlineCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambdaOnInlineCallSite.1.kt
|
||||
//_DefaultPackage$lambdaOnInlineCallSite_1$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,56:1
|
||||
//*E
|
||||
@@ -0,0 +1,7 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
@@ -0,0 +1,45 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
res = "OK"
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//object.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 object.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 object.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,45:1
|
||||
//4#2,5:46
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//object.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 object.2.kt
|
||||
//builders/BuildersPackage$object_2$HASH$call$1
|
||||
//+ 2 object.1.kt
|
||||
//_DefaultPackage$object_1$HASH
|
||||
//*L
|
||||
//1#1,21:1
|
||||
//8#2:22
|
||||
//*E
|
||||
@@ -0,0 +1,21 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return object {
|
||||
fun run () {
|
||||
init()
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//object.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 object.2.kt
|
||||
//builders/BuildersPackage$object_2$HASH$call$1
|
||||
//*L
|
||||
//1#1,21:1
|
||||
//*E
|
||||
@@ -0,0 +1,36 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
object {
|
||||
fun run () {
|
||||
res = "OK"
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//objectOnCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnCallSite.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 objectOnCallSite.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,36:1
|
||||
//4#2:37
|
||||
//*E
|
||||
@@ -0,0 +1,7 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
@@ -0,0 +1,58 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
object {
|
||||
fun run () {
|
||||
res = "OK"
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
//TODO SHOULD BE LESS
|
||||
|
||||
//SMAP
|
||||
//objectOnInlineCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 objectOnInlineCallSite.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,58:1
|
||||
//4#2:59
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//objectOnInlineCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite.1.kt
|
||||
//_DefaultPackage$objectOnInlineCallSite_1$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,58:1
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//objectOnInlineCallSite.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite.1.kt
|
||||
//_DefaultPackage$objectOnInlineCallSite_1$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,58:1
|
||||
//*E
|
||||
@@ -0,0 +1,7 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
@@ -0,0 +1,32 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//objectOnInlineCallSite2.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,32:1
|
||||
//8#2,11:33
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//objectOnInlineCallSite2.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,42:1
|
||||
//*E
|
||||
@@ -0,0 +1,42 @@
|
||||
package builders
|
||||
|
||||
inline fun call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
call {
|
||||
object {
|
||||
fun run () {
|
||||
res = "OK"
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
//TODO SHOULD BE LESS
|
||||
|
||||
//SMAP
|
||||
//objectOnInlineCallSite2.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,42:1
|
||||
//*E
|
||||
//
|
||||
//SMAP
|
||||
//objectOnInlineCallSite2.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,42:1
|
||||
//*E
|
||||
@@ -0,0 +1,25 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
massert(true)
|
||||
massert(true) {
|
||||
"test"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//assertion.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 assertion.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 assertion.2.kt
|
||||
//test/TestPackage
|
||||
//*L
|
||||
//1#1,25:1
|
||||
//15#2,7:26
|
||||
//6#2,7:33
|
||||
//*E
|
||||
@@ -0,0 +1,34 @@
|
||||
package test
|
||||
|
||||
public val MASSERTIONS_ENABLED: Boolean = true
|
||||
|
||||
public inline fun massert(value: Boolean, lazyMessage: () -> String) {
|
||||
if (MASSERTIONS_ENABLED) {
|
||||
if (!value) {
|
||||
val message = lazyMessage()
|
||||
throw AssertionError(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public inline fun massert(value: Boolean, message: Any = "Assertion failed") {
|
||||
if (ASSERTIONS_ENABLED) {
|
||||
if (!value) {
|
||||
throw AssertionError(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO SHOUDL BE ABSENT
|
||||
|
||||
//SMAP
|
||||
//assertion.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 assertion.2.kt
|
||||
//test/TestPackage
|
||||
//*L
|
||||
//1#1,34:1
|
||||
//*E
|
||||
@@ -0,0 +1,22 @@
|
||||
fun box(): String {
|
||||
return test {
|
||||
"K"
|
||||
}
|
||||
}
|
||||
|
||||
inline fun test(p: () -> String): String {
|
||||
var pd = ""
|
||||
pd = "O"
|
||||
return pd + p()
|
||||
}
|
||||
//TODO should be empty
|
||||
//SMAP
|
||||
//oneFile.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 oneFile.1.kt
|
||||
//_DefaultPackage
|
||||
//*L
|
||||
//1#1,22:1
|
||||
//*E
|
||||
@@ -0,0 +1,5 @@
|
||||
package zzz
|
||||
|
||||
inline fun nothing() {}
|
||||
|
||||
//SMAP ABSENT
|
||||
@@ -0,0 +1,38 @@
|
||||
import builders.*
|
||||
import kotlin.InlineOption.*
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
html {
|
||||
head {
|
||||
res = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
var expected = test();
|
||||
|
||||
return expected
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//smap.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 smap.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 smap.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,38:1
|
||||
//16#2:39
|
||||
//4#2,9:40
|
||||
//8#2,3:49
|
||||
//5#2:52
|
||||
//*E
|
||||
@@ -0,0 +1,28 @@
|
||||
package builders
|
||||
|
||||
inline fun init(init: () -> Unit) {
|
||||
init()
|
||||
}
|
||||
|
||||
inline fun initTag2(init: () -> Unit) {
|
||||
val p = 1;
|
||||
init()
|
||||
}
|
||||
|
||||
inline fun head(init: () -> Unit) = initTag2(init)
|
||||
|
||||
|
||||
inline fun html(init: () -> Unit) {
|
||||
return init(init)
|
||||
}
|
||||
//TODO SHOULD BE EMPTY
|
||||
//SMAP
|
||||
//smap.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 smap.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,28:1
|
||||
//*E
|
||||
+80
@@ -43,6 +43,7 @@ import java.util.regex.Pattern;
|
||||
BlackBoxInlineCodegenTestGenerated.NonLocalReturns.class,
|
||||
BlackBoxInlineCodegenTestGenerated.Reified.class,
|
||||
BlackBoxInlineCodegenTestGenerated.Simple.class,
|
||||
BlackBoxInlineCodegenTestGenerated.Smap.class,
|
||||
BlackBoxInlineCodegenTestGenerated.Special.class,
|
||||
BlackBoxInlineCodegenTestGenerated.Trait.class,
|
||||
BlackBoxInlineCodegenTestGenerated.TryCatchFinally.class,
|
||||
@@ -737,6 +738,85 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({Smap.Anonymous.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Smap extends AbstractBlackBoxInlineCodegenTest {
|
||||
public void testAllFilesPresentInSmap() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.1.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("assertion.1.kt")
|
||||
public void testAssertion() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("oneFile.1.kt")
|
||||
public void testOneFile() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("smap.1.kt")
|
||||
public void testSmap() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Anonymous extends AbstractBlackBoxInlineCodegenTest {
|
||||
public void testAllFilesPresentInAnonymous() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.1.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("lambda.1.kt")
|
||||
public void testLambda() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaOnCallSite.1.kt")
|
||||
public void testLambdaOnCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaOnInlineCallSite.1.kt")
|
||||
public void testLambdaOnInlineCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("object.1.kt")
|
||||
public void testObject() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectOnCallSite.1.kt")
|
||||
public void testObjectOnCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectOnInlineCallSite.1.kt")
|
||||
public void testObjectOnInlineCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectOnInlineCallSite2.1.kt")
|
||||
public void testObjectOnInlineCallSite2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt");
|
||||
doTestMultiFileWithInlineCheck(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/special")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+80
@@ -43,6 +43,7 @@ import java.util.regex.Pattern;
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.NonLocalReturns.class,
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.Reified.class,
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.Simple.class,
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.Smap.class,
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.Special.class,
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.Trait.class,
|
||||
CompileKotlinAgainstInlineKotlinTestGenerated.TryCatchFinally.class,
|
||||
@@ -737,6 +738,85 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@InnerTestClasses({Smap.Anonymous.class})
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Smap extends AbstractCompileKotlinAgainstInlineKotlinTest {
|
||||
public void testAllFilesPresentInSmap() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.1.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("assertion.1.kt")
|
||||
public void testAssertion() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("oneFile.1.kt")
|
||||
public void testOneFile() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("smap.1.kt")
|
||||
public void testSmap() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Anonymous extends AbstractCompileKotlinAgainstInlineKotlinTest {
|
||||
public void testAllFilesPresentInAnonymous() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.1.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("lambda.1.kt")
|
||||
public void testLambda() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaOnCallSite.1.kt")
|
||||
public void testLambdaOnCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaOnInlineCallSite.1.kt")
|
||||
public void testLambdaOnInlineCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("object.1.kt")
|
||||
public void testObject() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectOnCallSite.1.kt")
|
||||
public void testObjectOnCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectOnInlineCallSite.1.kt")
|
||||
public void testObjectOnInlineCallSite() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("objectOnInlineCallSite2.1.kt")
|
||||
public void testObjectOnInlineCallSite2() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.1.kt");
|
||||
doBoxTestWithInlineCheck(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/special")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at stepIntoFromInlineFun.kt:13
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoFromInlineFun.StepIntoFromInlineFunPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepIntoFromInlineFun.kt:13
|
||||
stepIntoFromInlineFun.kt:7
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at stepIntoInlineFun.kt:8
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoInlineFun.StepIntoInlineFunPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepIntoInlineFun.kt:8
|
||||
stepIntoInlineFun.kt:13
|
||||
stepIntoInlineFun.kt:8
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at stepIntoStdLibInlineFun.kt:6
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdLibInlineFun.StepIntoStdLibInlineFunPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepIntoStdLibInlineFun.kt:6
|
||||
_Mapping.!EXT!
|
||||
resuming stepIntoStdLibInlineFun.kt:5
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,17 @@
|
||||
package stepIntoFromInlineFun
|
||||
|
||||
class A()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
a.test { it + 1 }
|
||||
val b = 1
|
||||
}
|
||||
|
||||
inline fun A.test(l: (Int) -> Unit) {
|
||||
//Breakpoint!
|
||||
l(11)
|
||||
}
|
||||
|
||||
// STEP_INTO: 1
|
||||
// TRACING_FILTERS_ENABLED: false
|
||||
@@ -0,0 +1,17 @@
|
||||
package stepIntoInlineFun
|
||||
|
||||
class A()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
//Breakpoint!
|
||||
a.test { it + 1 }
|
||||
val b = 1
|
||||
}
|
||||
|
||||
inline fun A.test(l: (Int) -> Unit) {
|
||||
l(11)
|
||||
}
|
||||
|
||||
// STEP_INTO: 2
|
||||
// TRACING_FILTERS_ENABLED: false
|
||||
@@ -0,0 +1,11 @@
|
||||
package stepIntoStdLibInlineFun
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = listOf(1)
|
||||
//Breakpoint!
|
||||
a.map { it + 1 }
|
||||
val b = 1
|
||||
}
|
||||
|
||||
// STEP_INTO: 1
|
||||
// TRACING_FILTERS_ENABLED: false
|
||||
@@ -242,6 +242,24 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stepIntoFromInlineFun.kt")
|
||||
public void testStepIntoFromInlineFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/stepIntoFromInlineFun.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stepIntoInlineFun.kt")
|
||||
public void testStepIntoInlineFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/stepIntoInlineFun.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stepIntoStdLibInlineFun.kt")
|
||||
public void testStepIntoStdLibInlineFun() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/stepIntoStdLibInlineFun.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticMethods.kt")
|
||||
public void testSyntheticMethods() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt");
|
||||
|
||||
Reference in New Issue
Block a user