diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2006-01-25 15:19:16 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2006-01-25 15:19:16 +0000 |
commit | 5953fca1fe8c7260b99cea8a86bdf8439b48ffc2 (patch) | |
tree | c53da1a04f7ab2b6d4202347d4187cf5f95ad38d /test/files/run/bugs.scala | |
parent | f8336becda846408925611fc0fb417243b88b824 (diff) | |
download | scala-5953fca1fe8c7260b99cea8a86bdf8439b48ffc2.tar.gz scala-5953fca1fe8c7260b99cea8a86bdf8439b48ffc2.tar.bz2 scala-5953fca1fe8c7260b99cea8a86bdf8439b48ffc2.zip |
Made 'bugs' test case more resistant to differe...
Made 'bugs' test case more resistant to differences between Java 1.4 and
1.5 (difference in reporting of class cast exceptions).
Diffstat (limited to 'test/files/run/bugs.scala')
-rw-r--r-- | test/files/run/bugs.scala | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index 90711e7ad2..8d611dae6a 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -221,8 +221,18 @@ class Bug213Bar extends Bug213Foo { object Bug213Test { def main(args: Array[String]): Unit = { val foo: Bug213Foo = new Bug213Bar; - foo.testAll; - foo.testAllRef; + try { + foo.testAll; + } catch { + case e: java.lang.ClassCastException => + Console.println("Cannot cast unit to All"); + } + try { + foo.testAllRef; + } catch { + case e: java.lang.ClassCastException => + Console.println("Cannot cast empty string to AllRef"); + } () } } |