Visual Assert – The Unit Testing Add-In for Visual C++
cfix – C/C++ Unit Testing for Win32 and NT



Method that may be overridden to implement initialization logic. This method will be called once per test method, before the individual test method is invoked. As such, this method should be used to initialize any state (for example, member variables) required by the tests.

This method corresponds to before routines in the Base API

virtual void Before();

When the before method fails, the current test method will not be called. The after method (if present) will not be called either.

For certain initialization work that should occur only once per fixture (rather than once per test routine), use a setup method rather than a before method.