diff --git "a/frameworks\\utest/source/case.cpp" "b/frameworks\\utest/source/case.cpp" index b5f5a93a3d..eb377679d3 100644 --- "a/frameworks\\utest/source/case.cpp" +++ "b/frameworks\\utest/source/case.cpp" @@ -103,7 +103,7 @@ Case::Case(const char *description, // control flow handler Case::Case(const char *description, const case_setup_handler_t setup_handler, - const case_repeat_count_handler_t case_repeat_count_handler, + const case_call_count_handler_t case_repeat_count_handler, const case_teardown_handler_t teardown_handler, const case_failure_handler_t failure_handler) : description(description), @@ -116,7 +116,7 @@ Case::Case(const char *description, {} Case::Case(const char *description, - const case_repeat_count_handler_t case_repeat_count_handler, + const case_call_count_handler_t case_repeat_count_handler, const case_failure_handler_t failure_handler) : description(description), handler(ignore_handler), @@ -128,7 +128,7 @@ Case::Case(const char *description, {} Case::Case(const char *description, - const case_repeat_count_handler_t case_repeat_count_handler, + const case_call_count_handler_t case_repeat_count_handler, const case_teardown_handler_t teardown_handler, const case_failure_handler_t failure_handler) : description(description), diff --git "a/frameworks\\utest/source/harness.cpp" "b/frameworks\\utest/source/harness.cpp" index daf75c3cf7..2e259d3a42 100644 --- "a/frameworks\\utest/source/harness.cpp" +++ "b/frameworks\\utest/source/harness.cpp" @@ -34,7 +34,7 @@ namespace const Case *case_current = NULL; control_t case_control = control_t(REPEAT_SETUP_TEARDOWN); - size_t case_repeat_count = 0; + size_t case_repeat_count = 1; minar::callback_handle_t case_timeout_handle = NULL; size_t case_validation_count = 0; @@ -150,7 +150,7 @@ void Harness::schedule_next_case() case_passed = 0; case_failed = 0; case_failed_before = 0; - case_repeat_count = 0; + case_repeat_count = 1; test_index_of_case++; } minar::Scheduler::postCallback(run_next_case); diff --git "a/frameworks\\utest/utest/case.h" "b/frameworks\\utest/utest/case.h" index 35b6639d12..bf9569ddeb 100644 --- "a/frameworks\\utest/utest/case.h" +++ "b/frameworks\\utest/utest/case.h" @@ -85,19 +85,19 @@ namespace v1 { const case_teardown_handler_t teardown_handler, const case_failure_handler_t failure_handler = default_handler); - // overloads for case_repeat_count_handler_t + // overloads for case_call_count_handler_t Case(const char *description, const case_setup_handler_t setup_handler, - const case_repeat_count_handler_t case_handler, + const case_call_count_handler_t case_handler, const case_teardown_handler_t teardown_handler = default_handler, const case_failure_handler_t failure_handler = default_handler); Case(const char *description, - const case_repeat_count_handler_t case_handler, + const case_call_count_handler_t case_handler, const case_failure_handler_t failure_handler = default_handler); Case(const char *description, - const case_repeat_count_handler_t case_handler, + const case_call_count_handler_t case_handler, const case_teardown_handler_t teardown_handler, const case_failure_handler_t failure_handler = default_handler); @@ -113,7 +113,7 @@ namespace v1 { const case_handler_t handler; const case_control_handler_t control_handler; - const case_repeat_count_handler_t repeat_count_handler; + const case_call_count_handler_t repeat_count_handler; const case_setup_handler_t setup_handler; const case_teardown_handler_t teardown_handler; diff --git "a/frameworks\\utest/utest/default_handlers.h" "b/frameworks\\utest/utest/default_handlers.h" index 3c9fa516ca..bc493b3312 100644 --- "a/frameworks\\utest/utest/default_handlers.h" +++ "b/frameworks\\utest/utest/default_handlers.h" @@ -63,7 +63,7 @@ namespace v1 { { const case_handler_t handler = case_handler_t(NULL); const case_control_handler_t control = case_control_handler_t(NULL); - const case_repeat_count_handler_t repeat_count = case_repeat_count_handler_t(NULL); + const case_call_count_handler_t call_count = case_call_count_handler_t(NULL); const test_setup_handler_t test_setup = test_setup_handler_t(1); const test_teardown_handler_t test_teardown = test_teardown_handler_t(1); @@ -75,7 +75,7 @@ namespace v1 { operator case_handler_t() const { return handler; } operator case_control_handler_t() const { return control; } - operator case_repeat_count_handler_t() const { return repeat_count; } + operator case_call_count_handler_t() const { return call_count; } operator test_setup_handler_t() const { return test_setup; } operator test_teardown_handler_t() const { return test_teardown; } diff --git "a/frameworks\\utest/utest/types.h" "b/frameworks\\utest/utest/types.h" index 26aedc1da2..a63d9c863a 100644 --- "a/frameworks\\utest/utest/types.h" +++ "b/frameworks\\utest/utest/types.h" @@ -80,21 +80,22 @@ namespace v1 { * Instead of using this class directly it is recommended to use the aliases for clearer * semantics: * @code - * control_t test_case(const size_t repeat_count) { + * control_t test_case(const size_t call_count) { * // repeat 5 times for a total of 6 calls - * return (repeat_count < 5) ? CaseRepeatHandler : CaseNext; + * return (call_count < 6) ? CaseRepeatHandler : CaseNext; * } * @endcode * * This class overloads the `+` operator to implement something similiar to saturated arbitration: * - The lower timeout value "wins". * - A more involved repeat "wins" (ie. `ALL` > 'HANDLER' > 'NONE'). + * - Next Case always wins. * * You may then add timeouts and repeats together: * @code - * control_t test_case(const size_t repeat_count) { + * control_t test_case(const size_t call_count) { * // repeat 5 times for a total of 6 calls, each with a 500ms asynchronous timeout - * return CaseTimeout(500) + ((repeat_count < 5) ? CaseRepeatAll : CaseNext); + * return CaseTimeout(500) + ((call_count < 6) ? CaseRepeatAll : CaseNoRepeat); * } * @endcode * @@ -259,12 +260,12 @@ namespace v1 { * This handler is called only if the case setup succeeded and then may be repeated or * awaiting a asynchronous callback, depending on the return modifiers. * - * @param repeat_count starting at `0`, contains the number of times this handler has been called + * @param call_count starting at `1`, contains the number of times this handler has been called * * @returns * A combination of control modifiers. */ - typedef control_t (*case_repeat_count_handler_t)(const size_t repeat_count); + typedef control_t (*case_call_count_handler_t)(const size_t call_count); /** Test case teardown handler. *