Add exception handling for test runner.
This commit is contained in:
parent
b76dc184b3
commit
d370c26c42
3 changed files with 11 additions and 3 deletions
|
@ -67,7 +67,16 @@ bool TestCaseRunner::run(const std::vector<std::string>& args)
|
|||
|
||||
sLastTestFailed = false;
|
||||
std::cout << "TestFramework: Running Test - " << test_case->getName() << std::endl;
|
||||
test_case->run();
|
||||
|
||||
try{
|
||||
test_case->run();
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
std::cout << "Failed with exception" << std::endl;
|
||||
mFailingTests.push_back(test_case->getName());
|
||||
};
|
||||
|
||||
if (sLastTestFailed)
|
||||
{
|
||||
std::cout << "Failed at line: " << sFailureLine << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue