ExitTest Statement

Exit the current Test.

Syntax

ExitTest

Comments

The statement is used to exit the current Test. All the usual end of test processing takes place, for example, the TestStatus is set according to the TestResult and any OnTestEnd event procedures will be called for the current test. ExitTest statement could be used in a procedure called from a test to end the current test. To Skip OnEndXXX events you can use the Test or Task statements with -1 as a task or test numbers (i.e. Task -1).

A run-time error is generated if no test is currently running, for example, performing Debug Doit on statements in a test when no program was running.

Example

Procedure CheckStatus (): Bool

{

If iDeviceStatus = PASS Then

Return True

ElseIf iDeviceStatus >= ERR Then

ExitTest ! skip the rest of this test

Endif

Return False

}

See Also

Goto, Task, Test