JS: move more test to box tests
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
package foo
|
||||
|
||||
class A(val c: Int) {
|
||||
}
|
||||
|
||||
|
||||
operator fun A.inc() = A(5)
|
||||
operator fun A.dec() = A(10)
|
||||
|
||||
fun box(): String {
|
||||
var a = A(1)
|
||||
|
||||
if ((++a).c != 5) return "fail1"
|
||||
if ((a++).c != 5) return "fail2"
|
||||
if ((--a).c != 10) return "fail3"
|
||||
if ((a--).c != 10) return "fail4"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user