tests: Add a test for list sorting

This commit is contained in:
Ilya Matveev
2017-02-27 16:27:45 +03:00
committed by ilmat192
parent 73adb8524d
commit 00e5e070d7
2 changed files with 14 additions and 0 deletions
+5
View File
@@ -613,6 +613,11 @@ task sort0(type: RunKonanTest) {
source = "runtime/collections/sort0.kt"
}
task sort1(type: RunKonanTest) {
goldValue = "[a, b, x]\n[-1, 0, 42, 239, 100500]\n"
source = "runtime/collections/sort1.kt"
}
task if_else(type: RunKonanTest) {
source = "codegen/branching/if_else.kt"
}
@@ -0,0 +1,9 @@
fun main(a: Array<String>) {
val foo = mutableListOf("x", "a", "b")
foo.sort()
println(foo.toString())
var bar = mutableListOf(239, 42, -1, 100500, 0)
bar.sort()
println(bar.toString())
}