1 /*
2  * Copyright (c) 2022 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 
9 /*
10  *  Validate expected behaviour when net_buf_alloc() is called
11  *
12  *  Expected behaviour:
13  *   - net_buf_alloc() to be called once with :
14  *       - correct memory allocation pool
15  *       - same timeout value passed to bt_buf_get_cmd_complete()
16  */
17 void expect_single_call_net_buf_alloc(struct net_buf_pool *pool, k_timeout_t *timeout);
18 
19 /*
20  *  Validate expected behaviour when net_buf_alloc() isn't called
21  *
22  *  Expected behaviour:
23  *   - net_buf_alloc() isn't called at all
24  */
25 void expect_not_called_net_buf_alloc(void);
26 
27 /*
28  *  Validate expected behaviour when net_buf_reserve() is called
29  *
30  *  Expected behaviour:
31  *   - net_buf_reserve() to be called once with :
32  *       - correct reference value
33  *       - 'reserve' argument set to 'BT_BUF_RESERVE' value
34  */
35 void expect_single_call_net_buf_reserve(struct net_buf *buf);
36 
37 /*
38  *  Validate expected behaviour when net_buf_reserve() isn't called
39  *
40  *  Expected behaviour:
41  *   - net_buf_reserve() isn't called at all
42  */
43 void expect_not_called_net_buf_reserve(void);
44 
45 /*
46  *  Validate expected behaviour when net_buf_ref() is called
47  *
48  *  Expected behaviour:
49  *   - net_buf_ref() to be called once with correct reference value
50  */
51 void expect_single_call_net_buf_ref(struct net_buf *buf);
52 
53 /*
54  *  Validate expected behaviour when net_buf_ref() isn't called
55  *
56  *  Expected behaviour:
57  *   - net_buf_ref() isn't called at all
58  */
59 void expect_not_called_net_buf_ref(void);
60