mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
773 B
37 lines
773 B
#ifndef __TESTRUNNER_H__
|
|
#define __TESTRUNNER_H__
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
#include "TextTestResult.h"
|
|
#include "MulticasterTest.h"
|
|
|
|
|
|
using namespace std;
|
|
|
|
typedef pair<string, Test *> mapping;
|
|
typedef vector<pair<string, Test *> > mappings;
|
|
|
|
class TestAllocator;
|
|
class TestRunner
|
|
{
|
|
protected:
|
|
TestAllocator * allocator;
|
|
bool m_wait;
|
|
vector<pair<string,Test *> > m_mappings;
|
|
|
|
public:
|
|
TestRunner ();
|
|
~TestRunner ();
|
|
|
|
void run (int ac, char **av);
|
|
void addTest (string name, Test *test)
|
|
{ m_mappings.push_back (mapping (name, test)); }
|
|
|
|
protected:
|
|
void run (Test *test);
|
|
void printBanner ();
|
|
|
|
};
|
|
|
|
#endif __TESTRUNNER_H__
|