diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/run/OrderingTest.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/files/run/OrderingTest.scala')
-rw-r--r-- | test/files/run/OrderingTest.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/OrderingTest.scala b/test/files/run/OrderingTest.scala index 8af18aaba5..53448fbbce 100644 --- a/test/files/run/OrderingTest.scala +++ b/test/files/run/OrderingTest.scala @@ -6,7 +6,7 @@ object Test extends App { assert((cmp == 0) == (cmp2 == 0)) assert((cmp > 0) == (cmp2 < 0)) assert((cmp < 0) == (cmp2 > 0)) - } + } def testAll[T](t1 : T, t2 : T)(implicit ord : Ordering[T]) = { assert(ord.compare(t1, t2) < 0) @@ -16,8 +16,8 @@ object Test extends App { } assert(Ordering[String].compare("australopithecus", "brontausaurus") < 0) - // assert(Ordering[Unit].compare((), ()) == 0) - + // assert(Ordering[Unit].compare((), ()) == 0) + testAll("bar", "foo"); testAll[Byte](0, 1); testAll(false, true) @@ -28,7 +28,7 @@ object Test extends App { testAll[Iterable[Int]](List(1, 2), List(2)); testAll((1, "bar"), (1, "foo")) testAll((1, "foo"), (2, "bar")) - + // sortBy val words = "The quick brown fox jumped over the lazy dog".split(' ') val result = words.sortBy(x => (x.length, x.head)) |