![]() |
Vault
4.1
|
There are some types of unit tests where you have to do some setup before actually invoking the VUnit subclass, where the setup can fail. More...
#include <vunit.h>
Public Member Functions | |
VFailureEmitter (const VString &testName, bool logOnSuccess, bool throwOnError, const VString &errorMessage) | |
virtual void | run () |
Executes the unit test. | |
Protected Attributes | |
VString | fErrorMessage |
There are some types of unit tests where you have to do some setup before actually invoking the VUnit subclass, where the setup can fail.
An example is setting up loopback socket, so that a unit test can send and receive data on the socket. If the setup fails, you want to emit a unit test failure to record the failure. This class lets you emit the failure information easily. Just declare this and give it a test name describing the failed setup operation, along with the error message you want shown, and "run" this unit test.
void VFailureEmitter::run | ( | ) | [virtual] |
Executes the unit test.
Must be overridden by concrete class.
Implements VUnit.
Definition at line 200 of file vunit.cpp.
References VString::chars(), VUnit::getName(), VUnit::logStatus(), and VUnit::test().