105 void Test(
string suite,
int timeoutS = 0,
int timeoutMs = 0,
int sortOrder = 0)
109 TimeoutMs = timeoutMs;
110 SortOrder = sortOrder;
129 void Step(EStage stage = EStage.Main)
141 proto native
static bool Run();
143 proto
static string Report();
145 proto native
static int GetNSuites();
147 proto native
static TestSuite GetSuite(
int handle);
149 proto native
static TestSuite ActiveSuite();
151 proto native
static bool Finished();
153 proto native
static void Begin();
155 proto native
static void End();
164 proto native
void SetResult(TestResultBase res);
174 proto
string GetName();
185 proto native
void SetResult(TestResultBase res);
187 proto native TestResultBase GetResult();
191 proto native
bool IsEnabled();
193 proto
string GetName();
226class TestBoolResult : TestResultBase
230 void TestBoolResult(bool val) { Value = val; }
232 override bool Failure() { return !Value; }
234 override string FailureText()
236 // junit kind of error report. (simple)
237 return "<failure type=\"BoolResult\">Failed</failure>";
241//-----------------------------------------------------------------------------
242class MyHarness : TestHarness
246//-----------------------------------------------------------------------------
247class MyTestSuite : TestSuite
254 Print("MyTestSuite::Prep");
262 Print("MyTestSuite::Count: cnt=" + cnt);
266 [Step(EStage.TearDown)]
270 Print("MyTestSuite::CountUp: cnt=" + cnt);
275//-----------------------------------------------------------------------------
277TestResultBase MyTest()
280 return new TestBoolResult(true);
283//-----------------------------------------------------------------------------
285class MyAsyncTest : TestBase
298 Print("AsyncTest::Pool::counter=" + counter);
302 Print("AsyncTest::Pool::Result");
303 SetResult(new TestBoolResult(false));
307 Print("AsyncTest::Pool::Progress");
Collection and main interface of the Testing framework.
Attribute used for tests annotation and assignment to Suites.
void SetEnabled()
prevents insider adding in the wrong position, HOTFIX
proto native bool IsEnabled()
Enabled flag getter.
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
class Test Stage
Attribute which marks a method as part of the testing process.
proto native int GetNTests()
Returns the number for tests within this suite.
TestHarness Managed SetResult(TestResultBase res)
Collection of tests.
string FailureText()
Text used for xml report output.
void Step(EStage stage=EStage.Main)
class Test Setup
Stage definition used in conjunction with Step attribute.
proto native TestBase GetTest(int handle)
Returns a test.
proto native string NativeFailureText()
TestBase Managed Failure()
Return true of the result means failure.
proto native bool NativeFailure()