Files
swift-mirror/test/1_stdlib/sort_String.swift
Jordan Rose e83c117c30 [test] Hack: run stdlib tests first to start long-running tests earlier.
This decreases total testing time by over a minute on my old Mac Pro.
It probably has much less effect on systems with fewer cores, but shouldn't
be any worse there.

Swift SVN r22745
2014-10-15 01:30:51 +00:00

24 lines
753 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
func test() {
var array = [String](count: 5, repeatedValue: "")
array[0] = "ysmwbgmrqlmqspzcgbgxvkebesoetqcimoaemfhfzzsamgju"
array[1] = "nqbvcxdahvxzmvnqjmoilinznqyfniufgsfoeok"
array[2] = "bsqdunldltkxripsaxkaojfiovnxulshiohbumirjzgfmovowiv"
array[3] = "hepdatupehcbbdyhyjsnvtzhfupd"
array[4] = "rlrezqqlfpoktoiitbtyngyyyeoglmwxfrxjtejmyy"
array = sorted(array)
for i in array {
println(i)
}
print("\n")
}
test()
// CHECK: bsqdunldltkxripsaxkaojfiovnxulshiohbumirjzgfmovowiv
// CHECK: hepdatupehcbbdyhyjsnvtzhfupd
// CHECK: nqbvcxdahvxzmvnqjmoilinznqyfniufgsfoeok
// CHECK: rlrezqqlfpoktoiitbtyngyyyeoglmwxfrxjtejmyy
// CHECK: ysmwbgmrqlmqspzcgbgxvkebesoetqcimoaemfhfzzsamgju