From dd6c1584690de3e060808cd63f73417c8dbe2cba Mon Sep 17 00:00:00 2001 From: paltherr Date: Fri, 3 Oct 2003 11:52:57 +0000 Subject: - Added bug 166 - Improved output and exception handling --- test/files/run/bugs.scala | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'test/files/run/bugs.scala') 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 @@ -57,6 +57,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 @@ -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 "")); + } } } -- cgit v1.2.3