mirror of https://github.com/ARMmbed/mbed-os.git
Move default handlers into specification.
parent
9a4e0d2da8
commit
2cf2ef5415
|
@ -42,7 +42,7 @@ namespace
|
||||||
size_t case_failed = 0;
|
size_t case_failed = 0;
|
||||||
size_t case_failed_before = 0;
|
size_t case_failed_before = 0;
|
||||||
|
|
||||||
handlers_t defaults = greentea_handlers;
|
handlers_t defaults = default_handlers;
|
||||||
handlers_t handlers = defaults;
|
handlers_t handlers = defaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,17 +50,13 @@ static void die() {
|
||||||
while(1) ;
|
while(1) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Harness::set_default_handlers(const handlers_t defaults)
|
|
||||||
{
|
|
||||||
::defaults = defaults;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Harness::run(const Specification specification)
|
void Harness::run(const Specification specification)
|
||||||
{
|
{
|
||||||
util::CriticalSectionLock lock;
|
util::CriticalSectionLock lock;
|
||||||
|
|
||||||
test_cases = specification.cases;
|
test_cases = specification.cases;
|
||||||
test_length = specification.length;
|
test_length = specification.length;
|
||||||
|
defaults = specification.defaults;
|
||||||
handlers.test_set_up = defaults.get_handler(specification.set_up_handler);
|
handlers.test_set_up = defaults.get_handler(specification.set_up_handler);
|
||||||
handlers.test_tear_down = defaults.get_handler(specification.tear_down_handler);
|
handlers.test_tear_down = defaults.get_handler(specification.tear_down_handler);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue