Move some tests from boxWithStdlib/ to box/

Move those tests which do not require neither stdlib nor reflect
This commit is contained in:
Alexander Udalov
2016-03-05 18:39:20 +03:00
committed by Alexander Udalov
parent 54a615fcd3
commit 20e36438e2
217 changed files with 1561 additions and 1397 deletions
@@ -0,0 +1,7 @@
fun box(): String {
if (!(1 < 2)) {
return "fail"
}
return "OK"
}
@@ -0,0 +1,7 @@
fun box(): String {
if (!false) {
return "OK"
} else {
return "fail"
}
}
@@ -0,0 +1,8 @@
fun box(): String {
var p = 2 < 1;
if (!p) {
return "OK"
} else {
return "fail"
}
}
@@ -0,0 +1,8 @@
fun box(): String {
val p = 2 < 1;
if (!!!!!p) {
return "OK"
} else {
return "fail"
}
}
@@ -0,0 +1,9 @@
val p: Int? = 1;
val z: Int? = 2;
fun box(): String {
if (!(p!! == z!!)) {
return "OK"
}
return "fail"
}
@@ -0,0 +1,9 @@
val p: Int? = 1;
val z: Int? = 2;
fun box(): String {
if (!(p!! < z!!)) {
return "fail"
}
return "OK"
}
@@ -0,0 +1,7 @@
fun box(): String {
if (!true) {
return "fail"
} else {
return "OK"
}
}
@@ -0,0 +1,8 @@
fun box(): String {
var p = 1 < 2;
if (!p) {
return "fail"
} else {
return "OK"
}
}
@@ -0,0 +1,28 @@
class A
class B
var holder = 0
operator fun A.not(): A {
holder++
return this;
}
operator fun B.not(): Boolean {
holder++
return false;
}
fun box(): String {
!!!!!A()
if (holder != 5) return "fail 1"
holder = 0;
if (!!!B() || holder != 1) return "fail 2"
if (!B() != false) return "fail 3"
if (!!B() != true) return "fail 4"
return "OK"
}