tests: timer_api: fix style

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-06-16 22:13:19 -04:00 committed by Kumar Gala
commit 1a1ae2f929
2 changed files with 22 additions and 22 deletions

View file

@ -103,7 +103,7 @@ void test_timer_duration_period(void)
k_timer_init(&timer, duration_expire, duration_stop);
k_timer_start(&timer, DURATION, PERIOD);
tdata.timestamp = k_uptime_get();
busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD/2);
busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2);
/** TESTPOINT: check expire and stop times */
TIMER_ASSERT(tdata.expire_cnt == EXPIRE_TIMES, &timer);
TIMER_ASSERT(tdata.stop_cnt == 1, &timer);
@ -135,7 +135,7 @@ void test_timer_expirefn_null(void)
/** TESTPOINT: expire function NULL */
k_timer_init(&timer, NULL, duration_stop);
k_timer_start(&timer, DURATION, PERIOD);
busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD/2);
busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2);
k_timer_stop(&timer);
/** TESTPOINT: expire handler is not invoked */
@ -155,7 +155,7 @@ void test_timer_status_get(void)
/** TESTPOINT: status get upon timer starts */
TIMER_ASSERT(k_timer_status_get(&timer) == 0, &timer);
/** TESTPOINT: remaining get upon timer starts */
TIMER_ASSERT(k_timer_remaining_get(&timer) >= DURATION/2, &timer);
TIMER_ASSERT(k_timer_remaining_get(&timer) >= DURATION / 2, &timer);
/* cleanup environment */
k_timer_stop(&timer);
@ -166,7 +166,7 @@ void test_timer_status_get_anytime(void)
init_timer_data();
k_timer_init(&timer, NULL, NULL);
k_timer_start(&timer, DURATION, PERIOD);
busy_wait_ms(DURATION + PERIOD * (EXPIRE_TIMES - 1) + PERIOD/2);
busy_wait_ms(DURATION + PERIOD * (EXPIRE_TIMES - 1) + PERIOD / 2);
/** TESTPOINT: status get at any time */
TIMER_ASSERT(k_timer_status_get(&timer) == EXPIRE_TIMES, &timer);
@ -200,7 +200,7 @@ void test_timer_k_define(void)
/** TESTPOINT: init timer via k_timer_init */
k_timer_start(&ktimer, DURATION, PERIOD);
tdata.timestamp = k_uptime_get();
busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD/2);
busy_wait_ms(DURATION + PERIOD * EXPIRE_TIMES + PERIOD / 2);
/** TESTPOINT: check expire and stop times */
TIMER_ASSERT(tdata.expire_cnt == EXPIRE_TIMES, &ktimer);
@ -222,9 +222,9 @@ static struct k_timer user_data_timer[5] = {
K_TIMER_INITIALIZER(user_data_timer[4], user_data_timer_handler, NULL),
};
static const intptr_t user_data[5] = {0x1337, 0xbabe, 0xd00d, 0xdeaf, 0xfade};
static const intptr_t user_data[5] = { 0x1337, 0xbabe, 0xd00d, 0xdeaf, 0xfade };
static int user_data_correct[5] = {0, 0, 0, 0, 0};
static int user_data_correct[5] = { 0, 0, 0, 0, 0 };
static void user_data_timer_handler(struct k_timer *timer)
{