2005-10-12 01:46:19 +02:00
|
|
|
#ifndef ARABICA_TEST_RUNNER_HPP
|
|
|
|
#define ARABICA_TEST_RUNNER_HPP
|
|
|
|
|
|
|
|
#include "../CppUnit/framework/Test.h"
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class TestRunner
|
|
|
|
{
|
|
|
|
protected:
|
2010-01-10 18:46:55 +01:00
|
|
|
bool m_wait;
|
2008-08-10 00:19:21 +02:00
|
|
|
bool verbose_;
|
2010-01-10 18:46:55 +01:00
|
|
|
std::vector<std::pair<std::string,Test *> > m_mappings;
|
2010-01-12 13:07:32 +01:00
|
|
|
std::string logprefix_;
|
2005-10-12 01:46:19 +02:00
|
|
|
|
|
|
|
public:
|
2010-01-10 18:46:55 +01:00
|
|
|
TestRunner() : m_wait(false), verbose_(false) {}
|
|
|
|
~TestRunner();
|
2005-10-12 01:46:19 +02:00
|
|
|
|
2010-01-10 18:46:55 +01:00
|
|
|
bool run(int ac, const char **av);
|
|
|
|
void addTest(std::string name, Test *test)
|
|
|
|
{ m_mappings.push_back(std::make_pair(name, test)); }
|
2005-10-12 01:46:19 +02:00
|
|
|
}; // TestRunner;
|
|
|
|
|
|
|
|
#endif
|