1 /*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include "mocks/adv.h"
8 #include "mocks/adv_expects.h"
9
10 #include <zephyr/kernel.h>
11
expect_single_call_bt_le_adv_lookup_legacy(void)12 void expect_single_call_bt_le_adv_lookup_legacy(void)
13 {
14 const char *func_name = "bt_le_adv_lookup_legacy";
15
16 zassert_equal(bt_le_adv_lookup_legacy_fake.call_count, 1,
17 "'%s()' was called more than once", func_name);
18 }
19
expect_not_called_bt_le_adv_lookup_legacy(void)20 void expect_not_called_bt_le_adv_lookup_legacy(void)
21 {
22 const char *func_name = "bt_le_adv_lookup_legacy";
23
24 zassert_equal(bt_le_adv_lookup_legacy_fake.call_count, 0, "'%s()' was called unexpectedly",
25 func_name);
26 }
27
expect_single_call_bt_le_ext_adv_foreach(void)28 void expect_single_call_bt_le_ext_adv_foreach(void)
29 {
30 const char *func_name = "bt_le_ext_adv_foreach";
31
32 zassert_equal(bt_le_ext_adv_foreach_fake.call_count, 1, "'%s()' was called more than once",
33 func_name);
34
35 zassume_not_null(bt_le_ext_adv_foreach_fake.arg0_val,
36 "'%s()' was called with incorrect '%s' value", func_name, "func");
37 }
38
expect_not_called_bt_le_ext_adv_foreach(void)39 void expect_not_called_bt_le_ext_adv_foreach(void)
40 {
41 const char *func_name = "bt_le_ext_adv_foreach";
42
43 zassert_equal(bt_le_ext_adv_foreach_fake.call_count, 0, "'%s()' was called unexpectedly",
44 func_name);
45 }
46