TestCaseStruct * m_currentTestCase;
- typedef std::set<std::string> SelectedTestNameSet;
- SelectedTestNameSet m_selectedTestNamesSet;
- typedef std::set<std::string> SelectedTestGroupSet;
- SelectedTestGroupSet m_selectedTestGroupSet;
std::string m_currentGroup;
- DPL::Atomic m_totalAssertions;
-
// Terminate without any logs.
// Some test requires to call fork function.
// Child process must not produce any logs and should die quietly.
void CollectResult(const std::string& id, const TestResult &result);
public:
- void MarkAssertion();
-
void RegisterTest(const char *testName, TestCase proc);
void InitGroup(const char* name);
int ExecTestRunner(int argc, char *argv[]);
typedef std::vector<std::string> ArgsList;
int ExecTestRunner(ArgsList args);
- bool getRunIgnored() const;
// The runner will terminate as soon as possible (after current test).
void Terminate();
bool GetAllowChildLogs();
#define RUNNER_ASSERT_MSG(test, message) \
do \
{ \
- DPL::Test::TestRunnerSingleton::Instance().MarkAssertion(); \
- \
if (!(test)) \
{ \
std::ostringstream assertMsg; \
#define RUNNER_ASSERT_ERRNO_MSG(test, message) \
do \
{ \
- DPL::Test::TestRunnerSingleton::Instance().MarkAssertion(); \
- \
if (!(test)) \
{ \
const char *err = strerror(errno); \
return ExecTestRunner(args);
}
-void TestRunner::MarkAssertion()
-{
- ++m_totalAssertions;
-}
-
int TestRunner::ExecTestRunner(ArgsList args)
{
m_runIgnored = false;
return 0;
}
-bool TestRunner::getRunIgnored() const
-{
- return m_runIgnored;
-}
-
void TestRunner::Terminate()
{
m_terminate = true;