Add support for runtime test specification

Add a constructor which explicitly takes the number of test cases.
This allows a test case array created at runtime to be used.
pull/4774/head
Russ Butler 2017-07-03 15:48:26 -05:00
parent 953b9250f1
commit e46bb0ed15
1 changed files with 12 additions and 0 deletions

View File

@ -159,6 +159,18 @@ namespace v1 {
);
}
Specification(const test_setup_handler_t setup_handler,
const Case *cases,
const size_t length,
const test_teardown_handler_t teardown_handler,
const test_failure_handler_t failure_handler,
const handlers_t defaults = default_handlers) :
setup_handler(setup_handler), teardown_handler(teardown_handler), failure_handler(failure_handler),
cases(cases), length(length),
defaults(defaults)
{
}
private:
const test_setup_handler_t setup_handler;
const test_teardown_handler_t teardown_handler;