CppUnit - The Unit Testing Library

CppUnit project page | FAQ

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
MfcTestRunner Class Reference
Executing test

MFC test runner.Use this to launch the MFC TestRunner. Usually called from you CWinApp subclass: More...

`#include <MfcTestRunner.h>`

## Public Member Functions
| MfcTestRunner ()
virtual | ~MfcTestRunner ()
void | run ()
void | addTest (Test *test)
void | addTests (const CppUnitVector< Test *> &tests)

## Protected Types
typedef CppUnitVector< Test * > | Tests

## Protected Member Functions
Test * | getRootTest ()

## Protected Attributes
TestSuite * | m_suite
Tests | m_tests

## Detailed Description

MFC test runner.

Use this to launch the MFC TestRunner. Usually called from you CWinApp subclass:

#include <cppunit/ui/mfc/MfcTestRunner.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
void
CHostAppApp::RunUnitTests()
{
CppUnit::MfcTestRunner runner;
runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
runner.run();
}

See also
  CppUnit::TextTestRunner, CppUnit::TestFactoryRegistry.

## Member Typedef Documentation

## § Tests

typedef CppUnitVector<Test *> MfcTestRunner::Tests
| protected

## Constructor & Destructor Documentation

## § MfcTestRunner()

MfcTestRunner::MfcTestRunner | ( |  | ) |

## § ~MfcTestRunner()

virtual MfcTestRunner::~MfcTestRunner | ( |  | ) |
| virtual

## Member Function Documentation

## § addTest()

void MfcTestRunner::addTest | ( | Test * | test | ) |

## § addTests()

void MfcTestRunner::addTests | ( | const CppUnitVector< Test *> & | tests | ) |

## § getRootTest()

Test* MfcTestRunner::getRootTest | ( |  | ) |
| protected

## § run()

void MfcTestRunner::run | ( |  | ) |

## Member Data Documentation

## § m_suite

TestSuite* MfcTestRunner::m_suite
| protected

## § m_tests

Tests MfcTestRunner::m_tests
| protected

The documentation for this class was generated from the following file:

- MfcTestRunner.h

| Send comments to: CppUnit Developers