Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be auto-generated
This commit is contained in:
committed by
Alexander Udalov
parent
ecbb2f10ef
commit
41a416da60
@@ -1,8 +0,0 @@
|
||||
fun box() : String {
|
||||
val y = 12
|
||||
val op = { (x:Int) -> (x + y).toString() }
|
||||
|
||||
val op2 : Int.(Int) -> String = { op(this + it) }
|
||||
|
||||
return if("27" == 5.op2(10)) "OK" else "fail"
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fun <T> T.mustBe(t : T) {
|
||||
assert("$this must be $t") {this == t}
|
||||
}
|
||||
|
||||
inline fun assert(message : String, condition : () -> Boolean) {
|
||||
if (!condition())
|
||||
throw AssertionError(message)
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
"lala" mustBe "lala"
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
class Request(val path: String) {
|
||||
|
||||
}
|
||||
|
||||
class Handler() {
|
||||
fun Int.times(op: ()-> Unit) {
|
||||
for(i in 0..this)
|
||||
op()
|
||||
}
|
||||
|
||||
// fun Request.getPath() : String {
|
||||
// val sb = java.lang.StringBuilder()
|
||||
// 10.times {
|
||||
// sb.append(path)?.append(this)
|
||||
// }
|
||||
// return sb.toString() as String
|
||||
// }
|
||||
|
||||
fun Request.getPath() = path
|
||||
|
||||
fun test(request: Request) = request.getPath()
|
||||
}
|
||||
|
||||
fun box() : String = if(Handler().test(Request("239")) == "239") "OK" else "fail"
|
||||
Reference in New Issue
Block a user