1 /*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include "mocks/scan.h"
8 #include "mocks/scan_expects.h"
9
10 #include <zephyr/kernel.h>
11
expect_call_count_bt_le_scan_set_enable(int call_count,uint8_t args_history[])12 void expect_call_count_bt_le_scan_set_enable(int call_count, uint8_t args_history[])
13 {
14 const char *func_name = "bt_le_scan_set_enable";
15
16 zassert_equal(bt_le_scan_set_enable_fake.call_count, call_count,
17 "'%s()' was called more than once", func_name);
18
19 for (size_t i = 0; i < call_count; i++) {
20 zassert_equal(bt_le_scan_set_enable_fake.arg0_history[i], args_history[i],
21 "'%s()' was called with incorrect '%s' value", func_name, "enable");
22 }
23 }
24
expect_not_called_bt_le_scan_set_enable(void)25 void expect_not_called_bt_le_scan_set_enable(void)
26 {
27 const char *func_name = "bt_le_scan_set_enable";
28
29 zassert_equal(bt_le_scan_set_enable_fake.call_count, 0, "'%s()' was called unexpectedly",
30 func_name);
31 }
32