blob: de065e66c29e558c6a3728eedc89d49e7250b9c7 (
plain) (
tree)
|
|
import tester.Runner;
import tester.Test.Test;
import tester.Test.Outcome;
class Foo extends Test {
override public function run():Outcome {
if (3 < 2) {
return Pass;
} else {
return Fail("Expected 1 < 2");
}
}
}
class Bar extends Test {
override public function run():Outcome {
if (false) {
return Pass;
} else {
return Fail("Test is supposed to always pass.");
}
}
}
class SimpleTests {
static function main() {
var runner = new Runner();
var tests = [
new Foo("Foo"),
new Bar("Bar")
];
// Prepare the tests to be run.
for (test in tests) {
runner.addTest(test);
}
// Run the tests.
runner.run();
}
}
|