aboutsummaryrefslogtreecommitdiff
path: root/tests/run/sort.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/sort.scala')
-rw-r--r--tests/run/sort.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/run/sort.scala b/tests/run/sort.scala
new file mode 100644
index 000000000..c38b8fbde
--- /dev/null
+++ b/tests/run/sort.scala
@@ -0,0 +1,9 @@
+object Test extends dotty.runtime.LegacyApp {
+ println((1 to 100000).toList.sortWith(_<_).length)
+ println(List(1, 5, 10, 3, 2).toList.sortWith(_<_))
+ println(List(1, 5, 10, 3, 2).toList.sortWith(_>_))
+ println(List(10).toList.sortWith(_<_))
+ println(List(10,9).toList.sortWith(_<_))
+ println(List[Int]().toList.sortWith(_<_))
+}
+