JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-29 12:37:13 +03:00
parent efb82a044f
commit cdf2212c73
70 changed files with 484 additions and 749 deletions
@@ -0,0 +1,16 @@
package foo
class A(t: Int) {
var i = t
infix operator fun compareTo(other: A) = (this.i - other.i)
}
fun box(): String {
if (A(3) compareTo A(2) <= 0) return "fail1"
if (A(2) compareTo A(2) != 0) return "fail2"
if (A(1) compareTo A(0) <= 0) return "fail3"
if (A(3) compareTo A(4) >= 0) return "fail4"
if (A(0) compareTo A(100) >= 0) return "fail5"
return "OK"
}