JS: update backend tests to respect new front-end rules for external declarations

This commit is contained in:
Alexey Andreev
2016-12-19 19:38:49 +03:00
parent 6ef4a3389e
commit 06e83e895f
8 changed files with 18 additions and 13 deletions
@@ -7,7 +7,7 @@ class A(val x: Int) {
}
external class B(x: Int) {
constructor(a: Int, b: Int) : this(0) {}
constructor(a: Int, b: Int) : this(0) { noImpl }
val x: Int
}
@@ -6,6 +6,6 @@ fun String.replaceAll(regexp: String, replacement: String): String = replace(Reg
inline fun String.search(regexp: RegExp): Int = asDynamic().search(regexp)
external class RegExp(regexp: String, flags: String = "") {
external class RegExp(regexp: String, flags: String = noImpl) {
fun exec(s: String): Array<String>? = noImpl
}
@@ -6,11 +6,13 @@ public fun public_baz(i: Int) {
log = "public_baz"
}
external public fun public_baz(a: String) {
noImpl
}
internal fun internal_baz(i: Int) {
}
internal external fun internal_baz(a: String) {
noImpl
}
private fun getCurrentPackage(): dynamic = js("_").foo
@@ -18,6 +20,7 @@ private fun getCurrentPackage(): dynamic = js("_").foo
private fun private_baz(i: Int) {
}
private external fun private_baz(a: String) {
noImpl
}
public class PublicClass {
@@ -1,11 +1,13 @@
package foo
external interface A {
val bar: Int get() = noImpl
fun foo(): String = noImpl
val bar: Int? get() = noImpl
fun foo(): String
}
class C : A
class C : A {
override fun foo() = "foo"
}
fun box(): String {
val c = C()
+1 -1
View File
@@ -1 +1 @@
external public fun parseInt(s: String, radix: Int = 10): Int = noImpl
external public fun parseInt(s: String, radix: Int = noImpl): Int = noImpl
+3 -3
View File
@@ -113,7 +113,7 @@ external object Object {
interface Trait {
val a: String
var b: String
fun test(): Int = noImpl
fun test(): Int
companion object {
val a: String = noImpl
@@ -149,7 +149,7 @@ external class Class {
interface Trait {
val a: String
var b: String
fun test(): Int = noImpl
fun test(): Int
companion object {
val a: String = noImpl
@@ -189,7 +189,7 @@ external interface Trait {
interface Trait {
val a: String
var b: String
fun test(): Int = noImpl
fun test(): Int
companion object {
val a: String = noImpl
@@ -1,7 +1,7 @@
external open class A {
open fun f(x: Int) = "number"
open fun f(x: Int): String = noImpl
open fun f(x: String) = "string"
open fun f(x: String): String = noImpl
}
class B : A() {
+2 -2
View File
@@ -16,11 +16,11 @@ fun anotherCount(vararg a: Int) = anotherParamCount(*a)
external fun test3(bar: Bar, dummy: Int, vararg args: Int): Boolean = noImpl
external class Bar(val size: Int, order: Int = 0) {
external class Bar(val size: Int, order: Int = noImpl) {
fun test(order: Int, dummy: Int, vararg args: Int): Boolean = noImpl
companion object {
fun startNewTest(): Boolean = noImpl
var hasOrderProblem: Boolean = false
var hasOrderProblem: Boolean = noImpl
}
}