[JS IR] Add tests for KT-48941

This commit is contained in:
Roman Artemev
2021-09-27 21:49:22 +03:00
committed by TeamCityServer
parent 7d4d035287
commit 18950feeff
5 changed files with 52 additions and 0 deletions
@@ -5165,6 +5165,16 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
runTest("js/js.translator/testData/box/jsCode/literal.kt");
}
@TestMetadata("literalInVal.kt")
public void testLiteralInVal() throws Exception {
runTest("js/js.translator/testData/box/jsCode/literalInVal.kt");
}
@TestMetadata("literalInValField.kt")
public void testLiteralInValField() throws Exception {
runTest("js/js.translator/testData/box/jsCode/literalInValField.kt");
}
@TestMetadata("numberLiteralOverflow.kt")
public void testNumberLiteralOverflow() throws Exception {
runTest("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt");
@@ -5165,6 +5165,16 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
runTest("js/js.translator/testData/box/jsCode/literal.kt");
}
@TestMetadata("literalInVal.kt")
public void testLiteralInVal() throws Exception {
runTest("js/js.translator/testData/box/jsCode/literalInVal.kt");
}
@TestMetadata("literalInValField.kt")
public void testLiteralInValField() throws Exception {
runTest("js/js.translator/testData/box/jsCode/literalInValField.kt");
}
@TestMetadata("numberLiteralOverflow.kt")
public void testNumberLiteralOverflow() throws Exception {
runTest("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt");
@@ -5175,6 +5175,16 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
runTest("js/js.translator/testData/box/jsCode/literal.kt");
}
@TestMetadata("literalInVal.kt")
public void testLiteralInVal() throws Exception {
runTest("js/js.translator/testData/box/jsCode/literalInVal.kt");
}
@TestMetadata("literalInValField.kt")
public void testLiteralInValField() throws Exception {
runTest("js/js.translator/testData/box/jsCode/literalInValField.kt");
}
@TestMetadata("numberLiteralOverflow.kt")
public void testNumberLiteralOverflow() throws Exception {
runTest("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt");
+11
View File
@@ -0,0 +1,11 @@
fun foo(): String {
val q1 = "O"
val q2 = "K"
val qq = q1 + q2
val b = js("\"$qq\"")
return b
}
fun box() = foo()
@@ -0,0 +1,11 @@
val p1 = "O"
val p2 = "K"
val pp = p1 + p2
fun bar(): String {
val v = pp
val b = js("\"$v\"")
return b
}
fun box(): String = bar()