Specify target backend as JVM for SAM tests; mute other failed tests and regenerate tests.

This commit is contained in:
Zalim Bashorov
2016-11-10 13:27:37 +03:00
parent 24819a079b
commit afa58599ec
17 changed files with 97 additions and 44 deletions
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
fun foo(x: Any) = x as Runnable
fun box(): String {
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
fun foo(x: Any) = x as? Runnable
fun box(): String {
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
fun foo(x: Any) = x is Runnable
fun box(): String {
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
fun foo(x: Any) = x !is Runnable
fun box(): String {
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
import java.io.Serializable
public data class Pair<out A, out B> (
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
data class A(val x: Array<Int>?, val y: IntArray?)
fun box(): String {
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
public class RunnableFunctionWrapper(val f : () -> Unit) : Runnable {
public override fun run() {
f()
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
fun box(): String {
return object {
fun foo(): String {
+3
View File
@@ -1,3 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
fun box() : String {
var a = 1
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
fun box(): String {
var result = "FAIL"
val f = { result = "OK" }
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
var result = "FAIL"
fun getFun(): () -> Unit {
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
var result = "FAIL"
fun box(): String {
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
fun box(): String {
val o = "O"
var result = ""
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
class Box(val s: String) {
fun extract(): String {
var result = ""
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
var global = ""
fun Runnable(f: () -> Unit) = object : Runnable {
@@ -12,6 +12,10 @@ class C : B<String, Runnable> {
}
}
interface Runnable {
fun run(): Unit
}
fun box(): String {
val x = C().foo("", 0)
return if (x == null) "OK" else "Fail: $x"
@@ -2638,7 +2638,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("as.kt")
public void testAs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/as.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("asForConstants.kt")
@@ -2655,7 +2660,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("asSafe.kt")
public void testAsSafe() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafe.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("asSafeFail.kt")
@@ -2713,7 +2723,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("is.kt")
public void testIs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/is.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("lambdaToUnitCast.kt")
@@ -2725,7 +2740,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("notIs.kt")
public void testNotIs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/notIs.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("unitAsAny.kt")
@@ -6063,7 +6083,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("kt5002.kt")
public void testKt5002() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/kt5002.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("mixedParams.kt")
@@ -6346,7 +6371,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("arrayParams.kt")
public void testArrayParams() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("changingVarParam.kt")
@@ -8818,7 +8848,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("kt1739.kt")
public void testKt1739() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1739.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("kt2270.kt")
@@ -12104,7 +12139,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("kt1737.kt")
public void testKt1737() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1737.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("kt2398.kt")
@@ -12122,7 +12162,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
@TestMetadata("kt2663_2.kt")
public void testKt2663_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663_2.kt");
doTest(fileName);
try {
doTest(fileName);
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
}
catch (Throwable ignore) {
}
}
@TestMetadata("kt2675.kt")
@@ -19061,36 +19106,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("nonLiteralRunnable.kt")
public void testNonLiteralRunnable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt");
doTest(fileName);
}
@TestMetadata("nonTrivialRunnable.kt")
public void testNonTrivialRunnable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt");
doTest(fileName);
}
@TestMetadata("runnable.kt")
public void testRunnable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnable.kt");
doTest(fileName);
}
@TestMetadata("runnableAccessingClosure1.kt")
public void testRunnableAccessingClosure1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt");
doTest(fileName);
}
@TestMetadata("runnableAccessingClosure2.kt")
public void testRunnableAccessingClosure2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt");
doTest(fileName);
}
@TestMetadata("samWrappersDifferentFiles.kt")
public void testSamWrappersDifferentFiles() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt");
@@ -19113,11 +19128,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("syntheticVsReal.kt")
public void testSyntheticVsReal() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt");
doTest(fileName);
}
}
}