Fix tests after introducing exlcusions to default imports of kotlin.js package.

This commit is contained in:
Ilya Gorbunov
2017-01-28 09:18:48 +03:00
parent 33f3106157
commit 38b79a51d5
11 changed files with 24 additions and 10 deletions
+2
View File
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
operator fun Int.plus(a: Int?) = this + a!!
public open class PerfectNumberFinder() {
@@ -4,5 +4,5 @@ class Test {
}
}
// EXIST: Any, Nothing, Unit, Int, Number, Array, Math
// EXIST: Any, Nothing, Unit, Int, Number, Array
// EXIST_JAVA_ONLY: Thread
@@ -3,5 +3,5 @@ class Test : <caret> {
}
}
// EXIST: Any, Nothing, Unit, Int, Number, Array, Math
// EXIST: Any, Nothing, Unit, Int, Number, Array
// EXIST_JAVA_ONLY: Thread
@@ -1,7 +1,12 @@
import kotlin.js.json
import kotlin.js.Json
import kotlin.js.JSON
import kotlin.js.undefined
fun main(args: Array<String>) {
val a: Json? = null
val a: dynamic = undefined
val b = JSON.stringify(a)
val j: Json = json("a" to 1)
}
// For KT-3620 Don't auto-import kotlin.js.* and remove in `optimize imports`
@@ -1,5 +1,10 @@
import kotlin.js.Json
import kotlin.js.json
fun main(args: Array<String>) {
val a: Json? = null
val a: dynamic = undefined
val b = JSON.stringify(a)
val j: Json = json("a" to 1)
}
// For KT-3620 Don't auto-import kotlin.js.* and remove in `optimize imports`
@@ -0,0 +1,4 @@
Additional checking of reference Getter: JSON
Additional checking of reference KtSimpleNameReference: JSON
Additional checking of reference Getter: undefined
Additional checking of reference KtSimpleNameReference: undefined
@@ -3882,12 +3882,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("kt903.kt")
public void testKt903() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt903.kt");
doTest(fileName);
}
@TestMetadata("kt940.kt")
public void testKt940() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt");
@@ -5,6 +5,7 @@
package creatures
import jquery.*
import kotlin.js.*
import kotlin.browser.window
import org.w3c.dom.*
@@ -6,6 +6,7 @@ Note that only a subset of the api is supported for now.
package fancylines
import kotlin.js.*
import kotlin.browser.window
import org.w3c.dom.*
import jquery.*
@@ -3,6 +3,7 @@
*/
package hello
import kotlin.js.*
import kotlin.browser.window
import org.w3c.dom.*
import jquery.*
@@ -1,5 +1,6 @@
package traffic
import kotlin.js.*
import kotlin.browser.window
import org.w3c.dom.*
import jquery.*