zephyr/tests/bluetooth/host/id/mocks/kernel_expects.c
Ahmed Moheb abb7e8bfc2 tests: bluetooth: host: Add UT for bt_id_init()
Unit test project for bt_id_init().
This part of subsys/bluetooth/host/id.c unit testing.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2023-01-17 13:13:28 +01:00

23 lines
696 B
C

/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "mocks/kernel.h"
#include "mocks/kernel_expects.h"
#include <zephyr/kernel.h>
void expect_single_call_k_work_init_delayable(struct k_work_delayable *dwork)
{
const char *func_name = "k_work_init_delayable";
zassert_equal(k_work_init_delayable_fake.call_count, 1, "'%s()' was called more than once",
func_name);
zassert_equal(k_work_init_delayable_fake.arg0_val, dwork,
"'%s()' was called with incorrect '%s' value", func_name, "dwork");
zassert_not_null(k_work_init_delayable_fake.arg1_val,
"'%s()' was called with incorrect '%s' value", func_name, "handler");
}