summaryrefslogtreecommitdiff
path: root/test/files/run/bugs.scala
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-03 11:52:57 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-03 11:52:57 +0000
commitdd6c1584690de3e060808cd63f73417c8dbe2cba (patch)
tree7a64c8f9904c2227102133ec75cbb0b66cbc0b00 /test/files/run/bugs.scala
parentc12c3d3856adcd1ff72879bbe37e4b4c93da91b2 (diff)
downloadscala-dd6c1584690de3e060808cd63f73417c8dbe2cba.tar.gz
scala-dd6c1584690de3e060808cd63f73417c8dbe2cba.tar.bz2
scala-dd6c1584690de3e060808cd63f73417c8dbe2cba.zip
- Added bug 166
- Improved output and exception handling
Diffstat (limited to 'test/files/run/bugs.scala')
-rw-r--r--test/files/run/bugs.scala32
1 files changed, 31 insertions, 1 deletions
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 ""));
+ }
}
}