From 5c8b65d6d070e53be312408689cf721d402c45c7 Mon Sep 17 00:00:00 2001 From: buraq Date: Tue, 5 Oct 2004 14:10:36 +0000 Subject: comments --- sources/scala/testing/SUnit.scala | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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: + + 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 <- r.failures()) { + Console.println(tf.toString()) + } +} + */ object SUnit { -- cgit v1.2.3