Replaced when appropriate 'TARGET_BACKEND: JVM' -> 'IGNORE_BACKEND: JS'. Enabled some succesfully working decompiledText tests.

This commit is contained in:
Anton Bannykh
2016-10-26 19:55:23 +03:00
parent dc151c1d84
commit 7ee3baa020
26 changed files with 46 additions and 59 deletions
@@ -1,4 +1,4 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
// reason - multifile tests are not supported in JS tests
//FILE: Holder.java
@@ -1,4 +1,4 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
// reason - multifile tests are not supported in JS tests
//FILE: JavaClass.java
+1 -1
View File
@@ -1,4 +1,4 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
// reason - no ArithmeticException in JS
fun box(): String {
val a1 = 0
+1 -1
View File
@@ -1,4 +1,4 @@
// TARGET_BACKEND: JVM
// 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
@@ -1,5 +1,5 @@
// TODO: Enable for JS when it supports Java class library.
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class SomeClass { companion object }
fun box() =
+1 -1
View File
@@ -1,5 +1,5 @@
// Enable for JS when it supports Java class library.
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class TestJava(r : Runnable) : Runnable by r {}
class TestRunnable() : Runnable {
+1 -1
View File
@@ -1,6 +1,6 @@
// Won't ever work with JS backend.
// TODO: Consider rewriting this test without using threads, since the issue is not about threads at all.
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
object RefreshQueue {
val any = Any()
+1 -1
View File
@@ -1,5 +1,5 @@
// TODO: Enable when JS backend supports Java class library
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
public class SomeClass() : java.lang.Object() {
}
+1 -1
View File
@@ -1,5 +1,5 @@
// TODO: Enable when JS backend supports Java class library, since FunctionX are required for interoperation
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class Works() : Function0<Any> {
public override fun invoke():Any {
return "Works" as Any
+1 -1
View File
@@ -1,5 +1,5 @@
// TODO: Enable when JS backend supports Java class library
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
public open class Test(): java.util.RandomAccess, Cloneable, java.io.Serializable
{
public override fun clone(): Test = Test() // Override 'clone()' with more precise type 'Test'
+1 -1
View File
@@ -1,5 +1,5 @@
// TODO: Enable when JS backend supports Java class library
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
import java.util.AbstractList
class MyList(): AbstractList<String>() {
+1 -1
View File
@@ -1,5 +1,5 @@
// TODO: Enable for JS when it supports Java class library.
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
import java.util.HashMap
import java.io.*
+1 -1
View File
@@ -1,5 +1,5 @@
// TODO: Enable for JS when it supports Java class library.
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class List<T>(val head: T, val tail: List<T>? = null)
fun <T> List<T>.mapHead(f: (T)-> T): List<T> = List<T>(f(head), null)
@@ -1,5 +1,5 @@
// TODO: Enable when JS backed gets support of Java class library
// TARGET_BACKEND: JVM
// TODO: Enable when JS backend gets support of Java class library
// IGNORE_BACKEND: JS
fun ok(b: Boolean) = if (b) "OK" else "Fail"
fun box(): String {
@@ -1,4 +1,4 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
// Enable when KT-12566 gets fixed
fun box(): String {
@@ -1,5 +1,5 @@
// TODO: enable JS backend when issue KT-14535 is fixed
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class A {
operator fun component1() = 1
operator fun component2() = 2
@@ -1,5 +1,5 @@
// TODO: enable JS backend when issue KT-14535 is fixed
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class A {
}
@@ -1,5 +1,5 @@
// TODO: enable JS backend when issue KT-14535 is fixed
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
class A {
operator fun component1() = 1
operator fun component2() = 2
@@ -1,5 +1,5 @@
// TODO enable for JS backend too when KT-7819 will be fixed
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
inline fun run(block: () -> Unit) = block()
@@ -1,4 +0,0 @@
// TODO Remove this restriction when nested classes will be supported in js backend.
// See KT-1907 Support nested classes in js-backend
// https://youtrack.jetbrains.com/issue/KT-1907
// TARGET_BACKEND: JVM
@@ -1,4 +0,0 @@
// TODO Remove this restriction when nested classes will be supported in js backend.
// See KT-1907 Support nested classes in js-backend
// https://youtrack.jetbrains.com/issue/KT-1907
// TARGET_BACKEND: JVM
@@ -1,2 +1,2 @@
// See KT-13691
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
@@ -1,4 +0,0 @@
// TODO Remove this restriction when nested classes will be supported in js backend.
// See KT-1907 Support nested classes in js-backend
// https://youtrack.jetbrains.com/issue/KT-1907
// TARGET_BACKEND: JVM
@@ -1,4 +1,4 @@
// TODO Remove this restriction when secondary constructors will be supported in js backend.
// See KT-7798 JS: add support for secondary constructors
// https://youtrack.jetbrains.com/issue/KT-7798
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JS
@@ -1 +0,0 @@
// TARGET_BACKEND: JVM
@@ -31,48 +31,24 @@ import java.util.regex.Pattern;
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCommonDecompiledTextFromJsMetadataTest {
@TestMetadata("DependencyOnNestedClasses")
public void ignoredDependencyOnNestedClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/");
doTest(fileName);
}
@TestMetadata("FlexibleTypes")
public void ignoredFlexibleTypes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/FlexibleTypes/");
doTest(fileName);
}
@TestMetadata("InnerClasses")
public void ignoredInnerClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/");
doTest(fileName);
}
@TestMetadata("LocalClassAsTypeWithArgument")
public void ignoredLocalClassAsTypeWithArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument/");
doTest(fileName);
}
@TestMetadata("NestedClasses")
public void ignoredNestedClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/");
doTest(fileName);
}
@TestMetadata("SecondaryConstructors")
public void ignoredSecondaryConstructors() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/SecondaryConstructors/");
doTest(fileName);
}
@TestMetadata("TypeAliases")
public void ignoredTypeAliases() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/TypeAliases/");
doTest(fileName);
}
public void testAllFilesPresentInDecompiledText() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText"), Pattern.compile("^([^\\.]+)$"), true);
}
@@ -113,6 +89,12 @@ public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCom
doTest(fileName);
}
@TestMetadata("DependencyOnNestedClasses")
public void testDependencyOnNestedClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/");
doTest(fileName);
}
@TestMetadata("Enum")
public void testEnum() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Enum/");
@@ -137,12 +119,24 @@ public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCom
doTest(fileName);
}
@TestMetadata("InnerClasses")
public void testInnerClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/");
doTest(fileName);
}
@TestMetadata("Modifiers")
public void testModifiers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Modifiers/");
doTest(fileName);
}
@TestMetadata("NestedClasses")
public void testNestedClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/");
doTest(fileName);
}
@TestMetadata("Object")
public void testObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Object/");
@@ -155,4 +149,10 @@ public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCom
doTest(fileName);
}
@TestMetadata("TypeAliases")
public void testTypeAliases() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/TypeAliases/");
doTest(fileName);
}
}