/* * Copyright (c) 2018 Nordic Semiconductor ASA * Copyright (c) 2015 Runtime Inc * * SPDX-License-Identifier: Apache-2.0 */ #include "settings_test.h" #include "settings/settings_fcb.h" ZTEST(settings_config_fcb, test_config_empty_fcb) { int rc; struct settings_fcb cf; config_wipe_srcs(); config_wipe_fcb(fcb_sectors, ARRAY_SIZE(fcb_sectors)); cf.cf_fcb.f_magic = CONFIG_SETTINGS_FCB_MAGIC; cf.cf_fcb.f_sectors = fcb_sectors; cf.cf_fcb.f_sector_cnt = ARRAY_SIZE(fcb_sectors); rc = settings_fcb_src(&cf); zassert_true(rc == 0, "settings_fcb_src call should succeed"); /* * No values */ settings_load(); config_wipe_srcs(); ctest_clear_call_state(); }