JS: update tests
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
// reason - Int doesn't overflow in JS, TODO: include after KT-7733 is fixed
|
||||
fun box(): String {
|
||||
val i1: Int = Int.MAX_VALUE
|
||||
val i2 = i1 + 1
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
fun test(i: Int): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
fun test(i: Int): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
+3
-21
@@ -1076,13 +1076,7 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
@TestMetadata("overflowInt.kt")
|
||||
public void testOverflowInt() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowInt.kt");
|
||||
try {
|
||||
doTest(fileName);
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("overflowLong.kt")
|
||||
@@ -9681,13 +9675,7 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
@TestMetadata("kt12125.kt")
|
||||
public void testKt12125() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125.kt");
|
||||
try {
|
||||
doTest(fileName);
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt12125_2.kt")
|
||||
@@ -9699,13 +9687,7 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
@TestMetadata("kt12125_inc.kt")
|
||||
public void testKt12125_inc() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt");
|
||||
try {
|
||||
doTest(fileName);
|
||||
}
|
||||
catch (Throwable ignore) {
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt12125_inc_2.kt")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package foo
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test1
|
||||
// CHECK_CONTAINS_NO_CALLS: test2
|
||||
// CHECK_CONTAINS_NO_CALLS: test3
|
||||
// CHECK_CONTAINS_NO_CALLS: test4_buocd8$
|
||||
// CHECK_CONTAINS_NO_CALLS: test5
|
||||
// CHECK_CONTAINS_NO_CALLS: test1 except=imul
|
||||
// CHECK_CONTAINS_NO_CALLS: test2 except=imul
|
||||
// CHECK_CONTAINS_NO_CALLS: test3 except=imul
|
||||
// CHECK_CONTAINS_NO_CALLS: test4_buocd8$ except=imul
|
||||
// CHECK_CONTAINS_NO_CALLS: test5 except=imul
|
||||
// CHECK_HAS_INLINE_METADATA: apply
|
||||
// CHECK_HAS_INLINE_METADATA: applyL_hiyix$
|
||||
// CHECK_HAS_INLINE_METADATA: applyM_hiyix$
|
||||
|
||||
@@ -12,7 +12,7 @@ public fun <T, R> apply(x: T, fn: (T)->R): R =
|
||||
|
||||
import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
// CHECK_CONTAINS_NO_CALLS: test except=imul
|
||||
|
||||
internal fun multiplyBy2(x: Int): Int = x * 2
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public fun <T, R> apply(x: T, fn: T.()->R): R =
|
||||
|
||||
import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
// CHECK_CONTAINS_NO_CALLS: test except=imul
|
||||
|
||||
internal class A(val n: Int)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public fun <T, R> apply(x: T, fn: (T)->R): R =
|
||||
|
||||
import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
// CHECK_CONTAINS_NO_CALLS: test except=imul
|
||||
|
||||
internal fun test(x: Int): Int = apply(x) { it * 2 }
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public fun <T, R> apply(x: T, fn: (T)->R): R {
|
||||
|
||||
import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test
|
||||
// CHECK_CONTAINS_NO_CALLS: test except=imul
|
||||
|
||||
internal fun test(x: Int, y: Int): Int = apply(x) { it + 1 } * y
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ package foo
|
||||
// CHECK_VARS_COUNT: function=test2 count=0
|
||||
// CHECK_VARS_COUNT: function=test3 count=0
|
||||
// CHECK_VARS_COUNT: function=test4 count=0
|
||||
// CHECK_VARS_COUNT: function=test5 count=0
|
||||
// CHECK_VARS_COUNT: function=test5 count=2
|
||||
|
||||
var global = ""
|
||||
var globalNum = 1
|
||||
|
||||
Reference in New Issue
Block a user