29 #ifndef CPPTEST_SUITE_H 30 #define CPPTEST_SUITE_H 58 void add(std::unique_ptr<Suite> suite);
60 bool run(
Output& output,
bool cont_after_fail =
true);
67 bool continue_after_failure()
const {
return _continue; }
83 friend struct ExecTests;
84 friend struct SubSuiteTests;
85 friend struct SubSuiteTime;
93 Data(
Func func,
const std::string& name)
94 : _func(func), _name(name) {}
97 typedef std::list<Data> Tests;
98 typedef std::list<Suite*> Suites;
101 const std::string* _cur_test;
109 void do_run(Output* os,
bool cont_after_fail);
110 int total_tests()
const;
111 Time total_time(
bool recursive)
const;
134 #define TEST_ADD(func)\ 135 register_test(static_cast<Func>(&func), #func); 139 #endif // #ifndef CPPTEST_SUITE_H virtual void tear_down()
Definition: cpptest-suite.h:70
void(Suite::* Func)()
Definition: cpptest-suite.h:65
Time representation.
Definition: cpptest-time.h:43
Assertment source information.
Definition: cpptest-source.h:42
virtual void setup()
Definition: cpptest-suite.h:69
void register_test(Func func, const std::string &name)
Definition: suite.cpp:135
void add(std::unique_ptr< Suite > suite)
Definition: suite.cpp:120
void assertment(Source s)
Definition: suite.cpp:152
virtual ~Suite()
Definition: suite.cpp:71
Definition: collectoroutput.cpp:37
Unit testing suite.
Definition: cpptest-suite.h:52
Test suite output handler.
Definition: cpptest-output.h:55
bool run(Output &output, bool cont_after_fail=true)
Definition: suite.cpp:85
Suite()
Definition: suite.cpp:63