diff options
author | paltherr <paltherr@epfl.ch> | 2003-10-03 11:52:57 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-10-03 11:52:57 +0000 |
commit | dd6c1584690de3e060808cd63f73417c8dbe2cba (patch) | |
tree | 7a64c8f9904c2227102133ec75cbb0b66cbc0b00 /test/files | |
parent | c12c3d3856adcd1ff72879bbe37e4b4c93da91b2 (diff) | |
download | scala-dd6c1584690de3e060808cd63f73417c8dbe2cba.tar.gz scala-dd6c1584690de3e060808cd63f73417c8dbe2cba.tar.bz2 scala-dd6c1584690de3e060808cd63f73417c8dbe2cba.zip |
- Added bug 166
- Improved output and exception handling
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/bugs.check | 3 | ||||
-rw-r--r-- | test/files/run/bugs.scala | 32 |
2 files changed, 34 insertions, 1 deletions
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check index f0206cb8b3..c0a07c9b4c 100644 --- a/test/files/run/bugs.check +++ b/test/files/run/bugs.check @@ -13,6 +13,9 @@ ok ok >>> bug 142 +<<< bug 166 +>>> bug 166 + <<< bug 167 >>> bug 167 diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index c410eb0240..6454e12c0f 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -58,6 +58,17 @@ object Bug142Test { } //############################################################################ +// Bug 166 + +object Bug166Test { + import scala.collection.mutable.HashMap ; + def main(args:Array[String]) = { + val m:HashMap[String,String] = new HashMap[String,String]; + m.update("foo","bar"); + } +} + +//############################################################################ // Bug 167 class Bug167Node(bar:Int) { @@ -120,18 +131,37 @@ object Bug174Test { // Main object Test { + var errors: Int = 0; def test(bug: Int, def test: Unit): Unit = { System.out.println("<<< bug " + bug); - test; + try { + test; + } catch { + case exception => { + val name: String = Thread.currentThread().getName(); + System.out.print("Exception in thread \"" + name + "\" "); + exception.printStackTrace(); + System.out.println(); + errors = errors + 1; + } + } System.out.println(">>> bug " + bug); System.out.println(); } + def main(args: Array[String]): Unit = { + test(135, Bug135Test.main(args)); test(142, Bug142Test.main(args)); + test(166, Bug166Test.main(args)); test(167, Bug167Test.main(args)); test(168, Bug168Test.main(args)); test(174, Bug174Test.main(args)); + + if (errors > 0) { + System.out.println(); + System.out.println(errors + " error" + (if (errors > 1) "s" else "")); + } } } |