Minor in JS backend tests: use checkFooBoxIsOk instead of fooBoxIsValue

This commit is contained in:
Zalim Bashorov
2015-06-03 17:40:47 +03:00
parent 92457543bc
commit 9d32f5e8ed
16 changed files with 32 additions and 34 deletions
@@ -5,5 +5,6 @@ fun MyController(`$scope`: String): String {
}
fun box(): String {
return MyController("world")
}
assertEquals("Hello world!", MyController("world"))
return "OK"
}
@@ -8,5 +8,6 @@ class Foo(val postfix: String) {
fun box(): String {
val a = Foo(" world!")
return a("hello")
}
assertEquals("hello world!", a("hello"))
return "OK"
}
@@ -4,6 +4,7 @@ fun box(): String {
val number = 3
val s1 = "${number - 1}${number}"
val s2 = "${5}${4}"
return "${s1}${s2}"
assertEquals("2354", "${s1}${s2}")
return "OK"
}
@@ -10,5 +10,6 @@ fun box(): String {
val a = Foo("abc")
val b = Foo("def")
val message = "a = $a, b = $b"
return message
}
assertEquals("a = abcS, b = defS", message)
return "OK"
}
@@ -1,6 +1,6 @@
package foo
fun box(): Int {
fun box(): String {
val c = 3
val d = 5
var z = 0
@@ -17,5 +17,6 @@ fun box(): Int {
z = -1000;
}
}
return z
}
assertEquals(2, z)
return "OK"
}
+2 -2
View File
@@ -40,5 +40,5 @@ fun box(): Any? {
if ((f3 / f4 - 2.5.toFloat()) > 0.01) {
return "9"
}
return "SUCCESS"
}
return "OK"
}
+5 -4
View File
@@ -4,9 +4,10 @@ class Test() {
var a: Int = 1
}
fun box(): Int {
var a = Test()
fun box(): String {
var b = Test()
assertEquals(1, b.a)
b.a = 100
return (b.a - a.a)
}
assertEquals(100, b.a)
return "OK"
}