diff options
Diffstat (limited to 'test/hooks.c')
-rw-r--r-- | test/hooks.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/hooks.c b/test/hooks.c index 26b02d511f..843833917a 100644 --- a/test/hooks.c +++ b/test/hooks.c @@ -56,6 +56,11 @@ static void deferred_func(void) } DECLARE_DEFERRED(deferred_func); +static void non_deferred_func(void) +{ + deferred_call_count++; +} + static int test_init(void) { TEST_ASSERT(init_hook_count == 1); @@ -116,6 +121,11 @@ static int test_deferred(void) usleep(50 * MSEC); TEST_ASSERT(deferred_call_count == 2); + TEST_ASSERT(hook_call_deferred(non_deferred_func, 50 * MSEC) != + EC_SUCCESS); + usleep(100 * MSEC); + TEST_ASSERT(deferred_call_count == 2); + return EC_SUCCESS; } |