Get rid of jvm specific code in some tests
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
@@ -7,7 +9,7 @@ inline fun asFailsWithCCE(operation: String, block: () -> Unit) {
|
||||
try {
|
||||
block()
|
||||
}
|
||||
catch (e: java.lang.ClassCastException) {
|
||||
catch (e: ClassCastException) {
|
||||
return
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
@@ -17,7 +19,7 @@ inline fun <reified T> reifiedAsFailsWithCCE(x: Any, operation: String) {
|
||||
try {
|
||||
x as T
|
||||
}
|
||||
catch (e: java.lang.ClassCastException) {
|
||||
catch (e: ClassCastException) {
|
||||
return
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
|
||||
+5
-3
@@ -1,5 +1,7 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -18,7 +20,7 @@ inline fun asFailsWithCCE(operation: String, cast: () -> Unit) {
|
||||
try {
|
||||
cast()
|
||||
}
|
||||
catch (e: java.lang.ClassCastException) {
|
||||
catch (e: ClassCastException) {
|
||||
return
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
@@ -73,7 +75,7 @@ inline fun <reified T> reifiedAsFailsWithCCE(x: Any, operation: String) {
|
||||
try {
|
||||
x as T
|
||||
}
|
||||
catch (e: java.lang.ClassCastException) {
|
||||
catch (e: ClassCastException) {
|
||||
return
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
|
||||
+15
@@ -2183,6 +2183,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/asFunKBig.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asFunKSmall.kt")
|
||||
public void testAsFunKSmall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("isFunKBig.kt")
|
||||
public void testIsFunKBig() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/isFunKBig.kt");
|
||||
@@ -2198,6 +2203,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedAsFunKSmall.kt")
|
||||
public void testReifiedAsFunKSmall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedIsFunKBig.kt")
|
||||
public void testReifiedIsFunKBig() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt");
|
||||
@@ -2313,6 +2323,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
public void testSafeAsWithMutable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("weirdMutableCasts.kt")
|
||||
public void testWeirdMutableCasts() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
@@ -2183,6 +2183,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/asFunKBig.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asFunKSmall.kt")
|
||||
public void testAsFunKSmall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("isFunKBig.kt")
|
||||
public void testIsFunKBig() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/isFunKBig.kt");
|
||||
@@ -2198,6 +2203,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedAsFunKSmall.kt")
|
||||
public void testReifiedAsFunKSmall() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedIsFunKBig.kt")
|
||||
public void testReifiedIsFunKBig() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt");
|
||||
@@ -2313,6 +2323,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
public void testSafeAsWithMutable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("weirdMutableCasts.kt")
|
||||
public void testWeirdMutableCasts() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user