Change-Id: I6a5257e0f4325f76219f798bc7e352fbef81376b
bool filterByXML(std::map<std::string, bool> & casesMap);
void normalizeXMLTag(std::string& str, const std::string& testcase);
bool filterByXML(std::map<std::string, bool> & casesMap);
void normalizeXMLTag(std::string& str, const std::string& testcase);
- enum Status { FAILED, IGNORED, PASS };
-
- Status RunTestCase(const TestCaseStruct& testCase);
+ void RunTestCase(const TestCaseStruct& testCase);
void setCurrentTestCase(TestCaseStruct* testCase);
TestCaseStruct *getCurrentTestCase();
void setCurrentTestCase(TestCaseStruct* testCase);
TestCaseStruct *getCurrentTestCase();
-TestRunner::Status TestRunner::RunTestCase(const TestCaseStruct& testCase)
+void TestRunner::RunTestCase(const TestCaseStruct& testCase)
{
setCurrentTestCase(&(const_cast<TestCaseStruct &>(testCase)));
try {
{
setCurrentTestCase(&(const_cast<TestCaseStruct &>(testCase)));
try {
getConcatedFailReason(e.GetMessage())));
setCurrentTestCase(nullptr);
getConcatedFailReason(e.GetMessage())));
setCurrentTestCase(nullptr);
} catch (const Ignored &e) {
if (m_runIgnored) {
// Simple test have to be implemented
} catch (const Ignored &e) {
if (m_runIgnored) {
// Simple test have to be implemented
}
setCurrentTestCase(nullptr);
}
setCurrentTestCase(nullptr);
} catch (const std::exception &) {
// std exception failure
CollectResult(testCase.name,
TestResult(TestResult::FailStatus::FAILED, "std exception"));
setCurrentTestCase(nullptr);
} catch (const std::exception &) {
// std exception failure
CollectResult(testCase.name,
TestResult(TestResult::FailStatus::FAILED, "std exception"));
setCurrentTestCase(nullptr);
} catch (...) {
// Unknown exception failure
CollectResult(testCase.name,
TestResult(TestResult::FailStatus::FAILED, "unknown exception"));
setCurrentTestCase(nullptr);
} catch (...) {
// Unknown exception failure
CollectResult(testCase.name,
TestResult(TestResult::FailStatus::FAILED, "unknown exception"));
setCurrentTestCase(nullptr);
CollectResult(testCase.name,
TestResult(TestResult::FailStatus::NONE,
std::string(),
testCase.performance));
setCurrentTestCase(nullptr);
CollectResult(testCase.name,
TestResult(TestResult::FailStatus::NONE,
std::string(),
testCase.performance));
setCurrentTestCase(nullptr);
-
- // Everything OK
- return PASS;
}
void TestRunner::RunTests()
}
void TestRunner::RunTests()