summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scala/testing/SUnit.scala23
1 files changed, 22 insertions, 1 deletions
diff --git a/sources/scala/testing/SUnit.scala b/sources/scala/testing/SUnit.scala
index a785f18b82..a8bd19b34d 100644
--- a/sources/scala/testing/SUnit.scala
+++ b/sources/scala/testing/SUnit.scala
@@ -9,7 +9,28 @@
package scala.testing;
-/** unit testing methods in the spirit of JUnit
+/** unit testing methods in the spirit of JUnit framework.
+ * use these classes like this:
+<code>
+ import scala.testing.SUnit;
+ import SUnit._;
+
+
+ class MyTest(n:String) extends TestCase(n) {
+
+ override def runTest() = n match {
+ case "myTest1" => assertTrue( true );
+ case "myTest2" => assertTrue( "hello", false );
+ }
+ }
+
+ val r = new TestResult();
+ suite.run(r);
+ for(val tf &lt;- r.failures()) {
+ Console.println(tf.toString())
+ }
+}
+</code>
*/
object SUnit {