zephyr/tests/bluetooth/host/conn/mocks/spinlock.h
Pavel Vasilyev 1fbcc0e6f9 tests: bluetooth: host: conn: Add bt_conn_le_create unit test
Add a test that checks behavior of
CONFIG_BT_CONN_CHECK_NULL_BEFORE_CREATE Kconfig option.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-18 17:46:04 +01:00

19 lines
725 B
C

/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/fff.h>
/* List of fakes used by this unit tester */
#define SPINLOCK_MOCKS_FFF_FAKES_LIST(FAKE) \
FAKE(z_spin_lock_valid) \
FAKE(z_spin_unlock_valid) \
FAKE(z_spin_lock_set_owner)
DECLARE_FAKE_VALUE_FUNC(bool, z_spin_lock_valid, struct k_spinlock *);
DECLARE_FAKE_VALUE_FUNC(bool, z_spin_unlock_valid, struct k_spinlock *);
DECLARE_FAKE_VOID_FUNC(z_spin_lock_set_owner, struct k_spinlock *);