This unit test class should be extended to create test cases. Each test method created in this extended class should start with the name "test".
These test methods should call the assertion methods:
assertTrue(a)
: Succeeds ifa
istrue
.assertFalse(a)
: Succeeds ifa
isfalse
.assertEquals(expected, actual)
: Succeeds ifexpected
andactual
are equal.
class MyTestCase extends haxe.unit.TestCase {
function testBasic() {
assertEquals("A", "A");
}
}
The TestCase can be tested using TestRunner
.
To run code before or after the test, override the functions setup
and tearDown
.
See: