Cleaning up after a test

The Test framework provides the member function Cleanup that you can use to perform any necessary cleanup after your test finishes. TTest::Cleanup is executed even if a software exception occurs.

You need to override Cleanup to restore the system to its previous state by undoing any actions, such as storage allocation, performed within Setup that affect the state of the system.

The Run member function catches exceptions that occur in Test and always calls Cleanup after calling Test.

If a hardware exception occurs in the Test member function, such as a bus error, then Cleanup is not called.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker