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

TestFixture::Before

TestFixture::Before
Synopsis

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

Declaration
virtual void Before();
					
Remarks

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

[Note]Note
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.