zephyr/tests/bluetooth/host/id/mocks/settings_expects.c
Théo Battrel 0f079a1ab8 Bluetooth: Unit: Fix unit tests that rely on settings
Following the previous commit that introduce the settings API for the
Bluetooth subsystem, some unit tests needed to be updated to use it.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-06-17 07:58:07 -04:00

43 lines
1.0 KiB
C

/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "mocks/settings.h"
#include "mocks/settings_expects.h"
#include <zephyr/kernel.h>
void expect_single_call_bt_settings_store_id(void)
{
const char *func_name = "bt_settings_store_id";
zassert_equal(bt_settings_store_id_fake.call_count, 1, "'%s()' was called more than once",
func_name);
}
void expect_not_called_bt_settings_store_id(void)
{
const char *func_name = "bt_settings_store_id";
zassert_equal(bt_settings_store_id_fake.call_count, 0, "'%s()' was called unexpectedly",
func_name);
}
void expect_single_call_bt_settings_store_irk(void)
{
const char *func_name = "bt_settings_store_irk";
zassert_equal(bt_settings_store_irk_fake.call_count, 1, "'%s()' was called more than once",
func_name);
}
void expect_not_called_bt_settings_store_irk(void)
{
const char *func_name = "bt_settings_store_irk";
zassert_equal(bt_settings_store_irk_fake.call_count, 0, "'%s()' was called unexpectedly",
func_name);
}