// tutorial14.ot
group "tutorial_14";
test("Base test")
{
verify(1 == 1);
}
test("Run if Base test succeeds") require success "Base test";
{
verify(2 == 2);
}
test("Run if Base test fails") require failure "Base test";
{
verify(3 == 3);
}
You can make a test only run, dependent on if other tests fail or succeed. In this example, the exact name of the test to be dependent on is given, but you can also use the wildcards * and ? to depend on a set of tests. See the manual for more information.
=========================================================================
Opera Testsuite
=========================================================================
=========================================================================
E:/src/operaclean/opera-windows7/modules/selftest/documentation/tutorial/tutorial14.ot(2): tutorial_14
=========================================================================
Base test ..................................................... Passed
Run if Base test succeeds ..................................... Passed
Run if Base test fails ........................................ Skipped ("Base test" not failed)
=========================================================================
2 tests run, 0 tests failed, 1 test skipped, 2 tests OK
=========================================================================