Add test
This commit is contained in:
committed by
Roman Artemev
parent
455edae7de
commit
d71ff1818d
+5
@@ -141,6 +141,11 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt");
|
runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("constructorsWithArgsSimple.kt")
|
||||||
|
public void testConstructorsWithArgsSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgsSimple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("extension.kt")
|
@TestMetadata("extension.kt")
|
||||||
public void testExtension() throws Exception {
|
public void testExtension() throws Exception {
|
||||||
runTest("js/js.translator/testData/box/callableReference/function/extension.kt");
|
runTest("js/js.translator/testData/box/callableReference/function/extension.kt");
|
||||||
|
|||||||
+5
@@ -141,6 +141,11 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt");
|
runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("constructorsWithArgsSimple.kt")
|
||||||
|
public void testConstructorsWithArgsSimple() throws Exception {
|
||||||
|
runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgsSimple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("extension.kt")
|
@TestMetadata("extension.kt")
|
||||||
public void testExtension() throws Exception {
|
public void testExtension() throws Exception {
|
||||||
runTest("js/js.translator/testData/box/callableReference/function/extension.kt");
|
runTest("js/js.translator/testData/box/callableReference/function/extension.kt");
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1112
|
||||||
|
package foo
|
||||||
|
|
||||||
|
class A(val x: Int) {
|
||||||
|
var s = "sA:init:$x"
|
||||||
|
}
|
||||||
|
|
||||||
|
class B(val arg1: String, val arg2: String) {
|
||||||
|
var msg = arg1 + arg2
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val ref = ::A
|
||||||
|
val result = ref(1).s + (::B)("23", "45").msg
|
||||||
|
return (if (result == "sA:init:12345") "OK" else result)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user