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

Event API

Event API

During execution of a test run, cfix generates a stream of events. This stream of events includes information about failed assertions, log messages, and status information indicating when execution of a test case begins and ends.

All this event information is delivered to an event sink. The default event sink used by cfix prints output to the console and is implemented in cfixcons.dll.

Using the Event API, developers can implement custom event sinks that replace the default console event sink. A custom event sink could, for example, gather events and write them to a log file in a specific format.

Event sinks are implemented in Event DLLs. This design allows event sinks to be generic and usable in combination with any kind of test module.

Event DLLs have to provide a single exported routine named CreateEventSink -- this routine serves as a factory routine for event sinks. The cfix runtime will call this routine once before starting a test run and will use the returned event sink to deliver all events to.