summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-10-05 14:10:36 +0000
committerburaq <buraq@epfl.ch>2004-10-05 14:10:36 +0000
commit5c8b65d6d070e53be312408689cf721d402c45c7 (patch)
tree4fe97677c4a4d97b593eb15a3cf0322a6f1062a8
parentcd968875793f503f82a4d36ec1eeb3036b44cdae (diff)
downloadscala-5c8b65d6d070e53be312408689cf721d402c45c7.tar.gz
scala-5c8b65d6d070e53be312408689cf721d402c45c7.tar.bz2
scala-5c8b65d6d070e53be312408689cf721d402c45c7.zip
comments
-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 {