Fix off-by-one error in case indexing.

Niklas Hauser 2015-11-25 15:41:33 +00:00 committed by Martin Kojtal
parent dc8c336652
commit d59284850d
1 changed files with 2 additions and 1 deletions

View File

@ -179,8 +179,9 @@ void Harness::run_next_case()
}
if ((!case_failed && !case_passed) || case_control.repeat == REPEAT_ALL) {
uint32_t index_of_case = test_index_of_case;
if (case_control.repeat == REPEAT_NO_REPEAT) test_index_of_case++;
if (handlers.case_setup && (handlers.case_setup(case_current, test_index_of_case) != STATUS_CONTINUE)) {
if (handlers.case_setup && (handlers.case_setup(case_current, index_of_case) != STATUS_CONTINUE)) {
raise_failure(FAILURE_SETUP);
schedule_next_case();
return;