From 1bd2e517a0af8c2b12b333a44b9e0ab4c6b546ff Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Fri, 19 Jan 2018 08:20:50 +0100 Subject: [PATCH] Modify ticker_init_test() to be consistent with the new requirement. --- TESTS/mbed_hal/lp_us_tickers/main.cpp | 4 ++-- TESTS/mbed_hal/lp_us_tickers/ticker_api_tests.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TESTS/mbed_hal/lp_us_tickers/main.cpp b/TESTS/mbed_hal/lp_us_tickers/main.cpp index 603e95aa7a..90a3841d0b 100644 --- a/TESTS/mbed_hal/lp_us_tickers/main.cpp +++ b/TESTS/mbed_hal/lp_us_tickers/main.cpp @@ -92,7 +92,7 @@ void wait_cycles(volatile unsigned int cycles) } /* Test that ticker_init can be called multiple times and - * ticker_init resets the internal count and disables the ticker interrupt. + * ticker_init allows the ticker to keep counting and disables the ticker interrupt. */ void ticker_init_test() { @@ -118,7 +118,7 @@ void ticker_init_test() } TEST_ASSERT(intf->read() >= (ticks_start + 2 * TICKER_INT_VAL)); - TEST_ASSERT(ticks_start > ticks_after_reinit); + TEST_ASSERT(ticks_start <= ticks_after_reinit); TEST_ASSERT_EQUAL(0, intFlag); } diff --git a/TESTS/mbed_hal/lp_us_tickers/ticker_api_tests.h b/TESTS/mbed_hal/lp_us_tickers/ticker_api_tests.h index 8247d7a99b..84b064de45 100644 --- a/TESTS/mbed_hal/lp_us_tickers/ticker_api_tests.h +++ b/TESTS/mbed_hal/lp_us_tickers/ticker_api_tests.h @@ -32,7 +32,7 @@ extern "C" { * * Given ticker is initialised and interrupt is set. * When ticker is re-initialised. - * Then ticker resets the internal count and disables the ticker interrupt. + * Then ticker keeps counting and disables the ticker interrupt. */ void ticker_init_test(void);