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

CFIXCC_BEGIN_CLASS

CFIXCC_BEGIN_CLASS

Synopsis

CFIXCC_BEGIN_CLASS defines the start of a C++ fixture definition. For each class inheriting from TestFixture, one such definition must be provided. The name of the respective class must be provided as argument.

If, for example, you have written a class MyTestClass, publicly derviving from TestFixture, you need to provide a fixture definition initiated by a CFIXCC_BEGIN_CLASS( MyTestClass ).

Declaration
CFIXCC_BEGIN_CLASS( ClassName )
				
[Note]Note
Do not put quotes around the class name. The name must match the name of the respective class, which in turn has to publicly derive from TestFixture.
Remarks

When the test class resides within a custom namespace, make sure to put the fixture definition into the same namespace. Example:

#include <cfixcc.h>

namespace test
{
class SimpleFixture : public cfixcc::TestFixture
{
public:
  void Method01() 
  {
	...
  }
};

CFIXCC_BEGIN_CLASS( SimpleFixture )
  CFIXCC_METHOD( Method01 )
CFIXCC_END_CLASS()

} // namespace

				

It is not allowed to specify a namespace-qualifed like test::SimpleFixture as argument to CFIXCC_BEGIN_CLASS. Please also note that cfix ignores the namespace when deriving the fixture name from the class. That is, the class name itself, without namespace qualification, must uniquely identify a fixture.

Requirements

Table 7.35. 

 User ModeKernel Mode
Available since1.2N/A
HeaderDeclared in cfixcc.hN/A
LibraryLink to cfix.libN/A
DLLcfix.dllN/A
IRQLN/AN/A