class TestCase
Base class for test cases
class TestCase.Matcher
Assertion Matcher, created by TestCase#expect()
function toBe(x : variant)
: void
function notToBe(x : variant)
: void
function toBeLT(x : number)
: void
function toBeLE(x : number)
: void
function toBeGT(x : number)
: void
function toBeGE(x : number)
: void
function toMatch(x : RegExp)
: void
function notToMatch(x : RegExp)
: void
var verbose : boolean
var showStackTrace : boolean
new TestCase()
function setUp()
: void
Set up for each test method.
function tearDown()
: void
Tear down for each test method.
function setUp(async : AsyncContext)
: void
Set up for each asynchronous test method.
function tearDown(async : AsyncContext)
: void
Tear down for each asynchronous test method.
__export__ function beforeClass(tests : Array.<string>)
: void
__export__ function afterClass()
: void
__export__ function run(name : string, testFunction : function () : void)
: void
function after(name : string)
: void
function finish()
: void
function async(testBody : function (:AsyncContext) : void, timeoutHandler : function (:AsyncContext) : void, timeoutMS : int)
: void
Prepares an asynchronous test block with a timeout handler.
function async(testBody : function (:AsyncContext) : void, timeoutMS : int)
: void
Prepares an asynchronous test block.
Automatically call this.fail()
on timeout.
function pass(reason : string)
: void
Tells a test passes.
function fail(reason : string)
: void
Tells a test fails.
function equals(a : variant, b : variant)
: boolean
function difflet(a : Array.<variant>, b : Array.<variant>)
: string
function diag(message : string)
: void
Shows diagnostic messages.
function note(message : string)
: void
Shows notes on verbose mode.
override function toString()
: string
class AsyncContext
new AsyncContext(test : TestCase, name : string, timeoutHandler : function (:AsyncContext) : void, timeoutMS : int)
function name()
: string
The name of the running test method, e.g. "testAsyncFoo"
.
function done()
: void