Source code of Windows XP (NT5)
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

  1. #ifndef __TESTRUNNER_H__
  2. #define __TESTRUNNER_H__
  3. #include <iostream>
  4. #include <vector>
  5. #include "TextTestResult.h"
  6. #include "MulticasterTest.h"
  7. using namespace std;
  8. typedef pair<string, Test *> mapping;
  9. typedef vector<pair<string, Test *> > mappings;
  10. class TestAllocator;
  11. class TestRunner
  12. {
  13. protected:
  14. TestAllocator * allocator;
  15. bool m_wait;
  16. vector<pair<string,Test *> > m_mappings;
  17. public:
  18. TestRunner ();
  19. ~TestRunner ();
  20. void run (int ac, char **av);
  21. void addTest (string name, Test *test)
  22. { m_mappings.push_back (mapping (name, test)); }
  23. protected:
  24. void run (Test *test);
  25. void printBanner ();
  26. };
  27. #endif __TESTRUNNER_H__