JS: move InlineMultiModuleTestGenerated under new test class
This commit is contained in:
@@ -1170,7 +1170,7 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractInlineMultiModuleTest>() {
|
testClass<AbstractInlineMultiModuleTest>() {
|
||||||
model("inlineMultiModule/cases", extension = null, recursive = false)
|
model("inlineMultiModule/cases")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractLabelTest>() {
|
testClass<AbstractLabelTest>() {
|
||||||
|
|||||||
+27
-27
@@ -32,84 +32,84 @@ import java.util.regex.Pattern;
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class InlineMultiModuleTestGenerated extends AbstractInlineMultiModuleTest {
|
public class InlineMultiModuleTestGenerated extends AbstractInlineMultiModuleTest {
|
||||||
public void testAllFilesPresentInCases() throws Exception {
|
public void testAllFilesPresentInCases() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/inlineMultiModule/cases"), Pattern.compile("^([^\\.]+)$"), false);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/inlineMultiModule/cases"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anotherModuleValInClosure")
|
@TestMetadata("anotherModuleValInClosure.kt")
|
||||||
public void testAnotherModuleValInClosure() throws Exception {
|
public void testAnotherModuleValInClosure() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/anotherModuleValInClosure/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/anotherModuleValInClosure.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("callableReference")
|
@TestMetadata("callableReference.kt")
|
||||||
public void testCallableReference() throws Exception {
|
public void testCallableReference() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/callableReference/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/callableReference.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("calledByFqName")
|
@TestMetadata("calledByFqName.kt")
|
||||||
public void testCalledByFqName() throws Exception {
|
public void testCalledByFqName() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/calledByFqName/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/calledByFqName.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionLambda")
|
@TestMetadata("extensionLambda.kt")
|
||||||
public void testExtensionLambda() throws Exception {
|
public void testExtensionLambda() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/extensionLambda/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/extensionLambda.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("externalInlineCallDecomposed")
|
@TestMetadata("externalInlineCallDecomposed.kt")
|
||||||
public void testExternalInlineCallDecomposed() throws Exception {
|
public void testExternalInlineCallDecomposed() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/externalInlineCallDecomposed/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/externalInlineCallDecomposed.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("externalInlineNewDecomposed")
|
@TestMetadata("externalInlineNewDecomposed.kt")
|
||||||
public void testExternalInlineNewDecomposed() throws Exception {
|
public void testExternalInlineNewDecomposed() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/externalInlineNewDecomposed/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/externalInlineNewDecomposed.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("lambda")
|
@TestMetadata("lambda.kt")
|
||||||
public void testLambda() throws Exception {
|
public void testLambda() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambda/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambda.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("lambdaCalledInObjectLiteral")
|
@TestMetadata("lambdaCalledInObjectLiteral.kt")
|
||||||
public void testLambdaCalledInObjectLiteral() throws Exception {
|
public void testLambdaCalledInObjectLiteral() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambdaCalledInObjectLiteral/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambdaCalledInObjectLiteral.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("lambdaWithClosure")
|
@TestMetadata("lambdaWithClosure.kt")
|
||||||
public void testLambdaWithClosure() throws Exception {
|
public void testLambdaWithClosure() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambdaWithClosure/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/lambdaWithClosure.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("localNameClash")
|
@TestMetadata("localNameClash.kt")
|
||||||
public void testLocalNameClash() throws Exception {
|
public void testLocalNameClash() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/localNameClash/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/localNameClash.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("method")
|
@TestMetadata("method.kt")
|
||||||
public void testMethod() throws Exception {
|
public void testMethod() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/method/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/method.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("parameterWithDefaultValue")
|
@TestMetadata("parameterWithDefaultValue.kt")
|
||||||
public void testParameterWithDefaultValue() throws Exception {
|
public void testParameterWithDefaultValue() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/parameterWithDefaultValue/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/parameterWithDefaultValue.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("simple")
|
@TestMetadata("simple.kt")
|
||||||
public void testSimple() throws Exception {
|
public void testSimple() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/simple/");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inlineMultiModule/cases/simple.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -17,7 +17,6 @@
|
|||||||
package org.jetbrains.kotlin.js.test.semantics
|
package org.jetbrains.kotlin.js.test.semantics
|
||||||
|
|
||||||
import org.jetbrains.kotlin.js.test.BasicBoxTest
|
import org.jetbrains.kotlin.js.test.BasicBoxTest
|
||||||
import org.jetbrains.kotlin.js.test.MultipleModulesTranslationTest
|
|
||||||
|
|
||||||
abstract class AbstractBridgeTest : BasicBoxTest("bridges/")
|
abstract class AbstractBridgeTest : BasicBoxTest("bridges/")
|
||||||
|
|
||||||
@@ -43,7 +42,7 @@ abstract class AbstractLabelTest : BasicBoxTest("labels/")
|
|||||||
|
|
||||||
abstract class AbstractMultiModuleTest : BasicBoxTest("multiModule/")
|
abstract class AbstractMultiModuleTest : BasicBoxTest("multiModule/")
|
||||||
|
|
||||||
abstract class AbstractInlineMultiModuleTest : MultipleModulesTranslationTest("inlineMultiModule/")
|
abstract class AbstractInlineMultiModuleTest : BasicBoxTest("inlineMultiModule/")
|
||||||
|
|
||||||
abstract class AbstractReservedWordTest : BasicBoxTest("reservedWords/")
|
abstract class AbstractReservedWordTest : BasicBoxTest("reservedWords/")
|
||||||
|
|
||||||
|
|||||||
+17
@@ -1,3 +1,20 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
public var LOG: String = ""
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun log(s: String): String {
|
||||||
|
LOG += s
|
||||||
|
return LOG
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
public var LOG: String = ""
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun log(s: String): String {
|
|
||||||
LOG += s
|
|
||||||
return LOG
|
|
||||||
}
|
|
||||||
+12
@@ -1,3 +1,15 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun <T, R> apply(x: T, fn: (T)->R): R =
|
||||||
|
fn(x)
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun <T, R> apply(x: T, fn: (T)->R): R =
|
|
||||||
fn(x)
|
|
||||||
+11
@@ -1,3 +1,14 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun sum(x: Int, y: Int): Int =
|
||||||
|
x + y
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
|
|
||||||
internal fun test(x: Int, y: Int): Int = utils.sum(x, y)
|
internal fun test(x: Int, y: Int): Int = utils.sum(x, y)
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun sum(x: Int, y: Int): Int =
|
|
||||||
x + y
|
|
||||||
+13
@@ -1,3 +1,16 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun <T, R> apply(x: T, fn: T.()->R): R =
|
||||||
|
x.fn()
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun <T, R> apply(x: T, fn: T.()->R): R =
|
|
||||||
x.fn()
|
|
||||||
+17
@@ -1,3 +1,20 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package lib
|
||||||
|
|
||||||
|
var global = ""
|
||||||
|
|
||||||
|
inline fun baz(x: () -> Int) = A(1).bar(x())
|
||||||
|
|
||||||
|
class A(val y: Int) {
|
||||||
|
fun bar(x: Int) = x + y
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
import lib.*
|
import lib.*
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
package lib
|
|
||||||
|
|
||||||
var global = ""
|
|
||||||
|
|
||||||
inline fun baz(x: () -> Int) = A(1).bar(x())
|
|
||||||
|
|
||||||
class A(val y: Int) {
|
|
||||||
fun bar(x: Int) = x + y
|
|
||||||
}
|
|
||||||
+18
@@ -1,3 +1,21 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package lib
|
||||||
|
|
||||||
|
var global = ""
|
||||||
|
|
||||||
|
inline fun baz(x: () -> Int) = ((A(1).B(x()) as Any) as A.B).bar()
|
||||||
|
|
||||||
|
class A(val y: Int) {
|
||||||
|
inner class B(val x: Int) {
|
||||||
|
fun bar() = x + y
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
import lib.*
|
import lib.*
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package lib
|
|
||||||
|
|
||||||
var global = ""
|
|
||||||
|
|
||||||
inline fun baz(x: () -> Int) = ((A(1).B(x()) as Any) as A.B).bar()
|
|
||||||
|
|
||||||
class A(val y: Int) {
|
|
||||||
inner class B(val x: Int) {
|
|
||||||
fun bar() = x + y
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+13
@@ -1,3 +1,16 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun <T, R> apply(x: T, fn: (T)->R): R =
|
||||||
|
fn(x)
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun <T, R> apply(x: T, fn: (T)->R): R =
|
|
||||||
fn(x)
|
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun <T, R> apply(x: T, crossinline fn: (T)->R): R {
|
||||||
|
val result = object {
|
||||||
|
val x = fn(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.x
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
import utils.*
|
||||||
|
|
||||||
|
internal fun test(x: Int): Int = apply(x) { it * 2 }
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
assertEquals(6, test(3))
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun <T, R> apply(x: T, crossinline fn: (T)->R): R {
|
|
||||||
val result = object {
|
|
||||||
val x = fn(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
return result.x
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
import utils.*
|
|
||||||
|
|
||||||
internal fun test(x: Int): Int = apply(x) { it * 2 }
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
assertEquals(6, test(3))
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
+13
@@ -1,3 +1,16 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun <T, R> apply(x: T, fn: (T)->R): R =
|
||||||
|
fn(x)
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun <T, R> apply(x: T, fn: (T)->R): R =
|
|
||||||
fn(x)
|
|
||||||
+15
@@ -1,3 +1,18 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun <T, R> apply(x: T, fn: (T)->R): R {
|
||||||
|
val y = fn(x)
|
||||||
|
return y
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun <T, R> apply(x: T, fn: (T)->R): R {
|
|
||||||
val y = fn(x)
|
|
||||||
return y
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
public class A(public val x: Int) {
|
||||||
|
inline
|
||||||
|
public fun plus(y: Int): Int = x + y
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
import utils.*
|
||||||
|
|
||||||
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
|
|
||||||
|
internal fun test(a: A, y: Int): Int = a.plus(y)
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
assertEquals(5, test(A(2), 3))
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
public class A(public val x: Int) {
|
|
||||||
inline
|
|
||||||
public fun plus(y: Int): Int = x + y
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import utils.*
|
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
|
||||||
|
|
||||||
internal fun test(a: A, y: Int): Int = a.plus(y)
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
assertEquals(5, test(A(2), 3))
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
+11
@@ -1,3 +1,14 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package foo
|
||||||
|
|
||||||
|
inline fun bar(x: Int = 0) = x + 10
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
// CHECK_NOT_CALLED: bar
|
// CHECK_NOT_CALLED: bar
|
||||||
-3
@@ -1,3 +0,0 @@
|
|||||||
package foo
|
|
||||||
|
|
||||||
inline fun bar(x: Int = 0) = x + 10
|
|
||||||
+13
@@ -1,3 +1,16 @@
|
|||||||
|
// MODULE: lib
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
inline
|
||||||
|
public fun sum(x: Int, y: Int): Int =
|
||||||
|
x + y
|
||||||
|
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
import utils.*
|
import utils.*
|
||||||
|
|
||||||
// CHECK_CONTAINS_NO_CALLS: test
|
// CHECK_CONTAINS_NO_CALLS: test
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package utils
|
|
||||||
|
|
||||||
inline
|
|
||||||
public fun sum(x: Int, y: Int): Int =
|
|
||||||
x + y
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
lib->
|
|
||||||
main->lib
|
|
||||||
Reference in New Issue
Block a user