diff options
author | michelou <michelou@epfl.ch> | 2007-09-27 16:38:24 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-09-27 16:38:24 +0000 |
commit | 9f847abf34ae332760f59a8a0131c003d2959344 (patch) | |
tree | 98651d0109776e299b26383523e1bc573d568f41 /src/library | |
parent | 1b41795f5117ddac2730d4ce5d5e393b736010b6 (diff) | |
download | scala-9f847abf34ae332760f59a8a0131c003d2959344.tar.gz scala-9f847abf34ae332760f59a8a0131c003d2959344.tar.bz2 scala-9f847abf34ae332760f59a8a0131c003d2959344.zip |
fixed #99, fixed order of worker queue
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/testing/SUnit.scala | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/library/scala/testing/SUnit.scala b/src/library/scala/testing/SUnit.scala index 115a75959d..7ab963a3be 100644 --- a/src/library/scala/testing/SUnit.scala +++ b/src/library/scala/testing/SUnit.scala @@ -90,9 +90,9 @@ object SUnit { } } - def setUp() = {} + def setUp() {} - def tearDown() = {} + def tearDown() {} override def toString() = name } @@ -115,8 +115,9 @@ object SUnit { class TestResult { val buf = new ArrayBuffer[(Test, Throwable)]() - def addFailure(test:Test, t:Throwable) = + def addFailure(test: Test, t: Throwable) { buf += (test, t) + } def failureCount() = buf.length @@ -136,8 +137,9 @@ object SUnit { buf ++= tests - def addTest(t: Test) = + def addTest(t: Test) { buf += t + } def run(r: TestResult) { for (t <- buf) t.run(r) @@ -146,10 +148,10 @@ object SUnit { /** an AssertFailed is thrown for a failed assertion */ case class AssertFailed(msg: String) extends RuntimeException { - override def toString() = "failed assertion:" + msg + override def toString() = "failed assertion: " + msg } - /** this class defined useful assert methods */ + /** this class defined useful <code>assert</code> methods */ trait Assert { /** fails if expected != actual */ |