JS backend: _commonFiles/ for common kotlin files in testData/ and every test dir
This commit is contained in:
committed by
Zalim Bashorov
parent
9b433e31a2
commit
dd3dbe5b10
-13
@@ -17,15 +17,6 @@ public class A : T {
|
||||
fun boo(i: Int): String = "A.boo" + i
|
||||
}
|
||||
|
||||
// Helpers
|
||||
native
|
||||
fun String.replace(regexp: RegExp, replacement: String): String = noImpl
|
||||
|
||||
fun String.replaceAll(regexp: String, replacement: String): String = replace(RegExp(regexp, "g"), replacement)
|
||||
|
||||
native
|
||||
class RegExp(regexp: String, flags: String)
|
||||
|
||||
//Testing
|
||||
|
||||
fun test(testName: String, ff: Any, fb: Any) {
|
||||
@@ -35,10 +26,6 @@ fun test(testName: String, ff: Any, fb: Any) {
|
||||
if (f != b) throw Exception("FAILED on ${testName}:\n f = \"$f\"\n b = \"$b\"")
|
||||
}
|
||||
|
||||
fun assertEquals<T>(expected: T, actual: T) {
|
||||
if (expected != actual) throw Exception("expected: $expected, actual: $actual")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user