From d59284850db8bb5b2518e1c84e4de25bb617a66f Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Wed, 25 Nov 2015 15:41:33 +0000 Subject: [PATCH] Fix off-by-one error in case indexing. --- "frameworks\\utest/source/harness.cpp" | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git "a/frameworks\\utest/source/harness.cpp" "b/frameworks\\utest/source/harness.cpp" index 3c0846df97..11a9e283ea 100644 --- "a/frameworks\\utest/source/harness.cpp" +++ "b/frameworks\\utest/source/harness.cpp" @@ -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;