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:
Alexander Udalov
2013-01-25 16:13:45 +04:00
committed by Alexander Udalov
parent ecbb2f10ef
commit 41a416da60
438 changed files with 156 additions and 2005 deletions
@@ -0,0 +1,28 @@
package invoke
fun test1(predicate: (Int) -> Int, i: Int) = predicate(i)
fun test2(predicate: (Int) -> Int, i: Int) = predicate.invoke(i)
class Method {
fun invoke(i: Int) = i
}
fun test3(method: Method, i: Int) = method.invoke(i)
fun test4(method: Method, i: Int) = method(i)
class Method2 {}
fun Method2.invoke(s: String) = s
fun test5(method2: Method2, s: String) = method2(s)
fun box() : String {
if (test1({ it }, 1) != 1) return "fail 1"
if (test2({ it }, 2) != 2) return "fail 2"
if (test3(Method(), 3) != 3) return "fail 3"
if (test4(Method(), 4) != 4) return "fail 4"
if (test5(Method2(), "s") != "s") return "fail5"
return "OK"
}