|
Scala 2.1.7
|
object
SUnit
extends
java.lang.Object with
scala.ScalaObject
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())
}
}
Constructor Summary | |
def
this
|
Class Summary | |
mixin abstract
|
class
Assert
this class defined useful assert methods |
case
|
class
AssertFailed
an AssertFailed is thrown for a failed assertion |
mixin abstract
|
class
Test
a Test can be run with its result being collected |
class
TestCase
a TestCase defines the fixture to run multiple tests |
|
class
TestFailure
a TestFailure collects a failed test together with the thrown exception |
|
class
TestResult
a TestResult collects the result of executing a test case |
|
class
TestSuite
a TestSuite runs a composite of test cases |
Constructor Detail |
def
this