Move default handlers into specification.

Niklas Hauser 2015-11-13 13:20:20 +00:00 committed by Martin Kojtal
parent 9a4e0d2da8
commit 2cf2ef5415
1 changed files with 2 additions and 6 deletions

View File

@ -42,7 +42,7 @@ namespace
size_t case_failed = 0;
size_t case_failed_before = 0;
handlers_t defaults = greentea_handlers;
handlers_t defaults = default_handlers;
handlers_t handlers = defaults;
}
@ -50,17 +50,13 @@ static void die() {
while(1) ;
}
void Harness::set_default_handlers(const handlers_t defaults)
{
::defaults = defaults;
}
void Harness::run(const Specification specification)
{
util::CriticalSectionLock lock;
test_cases = specification.cases;
test_length = specification.length;
defaults = specification.defaults;
handlers.test_set_up = defaults.get_handler(specification.set_up_handler);
handlers.test_tear_down = defaults.get_handler(specification.tear_down_handler);