diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-02-10 09:56:32 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-02-10 09:56:32 +0000 |
commit | ebb6a2a06a09a4c816a8531c9996c2f3df9aa5eb (patch) | |
tree | 1d2cb96d4fbcc48a9a8d1295977ed78bdec5bb36 /test/files/run | |
parent | b0bcd0a40d209e02cd8bbabedc5819f6ce8108ef (diff) | |
download | scala-ebb6a2a06a09a4c816a8531c9996c2f3df9aa5eb.tar.gz scala-ebb6a2a06a09a4c816a8531c9996c2f3df9aa5eb.tar.bz2 scala-ebb6a2a06a09a4c816a8531c9996c2f3df9aa5eb.zip |
added test for 1691
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/lists.scala | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/files/run/lists.scala b/test/files/run/lists.scala index 2d55563f60..665cf51970 100644 --- a/test/files/run/lists.scala +++ b/test/files/run/lists.scala @@ -14,7 +14,8 @@ import testing.SUnit._ object Test extends TestConsoleMain { def suite = new TestSuite( Test1, //count, exists, filter, .. - Test2 //#468 + Test2, //#468 + Test3 //#1691 ) } @@ -105,3 +106,23 @@ object Test2 extends TestCase("t0468") with Assert { assertEquals("check_++", 14, n2 + n3 + n4) } } + +object Test3 extends TestCase("t1691") with Assert { + override def enableStackTrace = false + override def runTest { + try { + List.range(1, 10, 0) + } catch { + case e: IllegalArgumentException => () + case _ => throw new Error("List.range(1, 10, 0)") + } + try { + List.range(1, 10, x => 4) + } catch { + case e: IllegalArgumentException => () + case _ => throw new Error("List.range(1, 10, x => 4)") + } + assertEquals(List.range(10, 0, x => x - 2), + List(10, 8, 6, 4, 2)) + } +} |