tests: misc: move the kconfig options test to new ztest API

Migrate the testsuite tests/misc/kconfigoptions to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
Enjia Mai 2022-09-09 08:33:20 +08:00 committed by Maureen Helm
commit d41c56c430
2 changed files with 4 additions and 10 deletions

View file

@ -1 +1,2 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y

View file

@ -10,23 +10,16 @@
* @brief Test .
*
*/
void test_kconfigoptions_array_hex(void)
ZTEST(kconfigoptions, test_kconfigoptions_array_hex)
{
zassert_equal(0x1, CONFIG_FLASH_CONTROLLER_ADDRESS,
"Unexpected flash controller address (%d)", CONFIG_FLASH_CONTROLLER_ADDRESS);
}
void test_kconfigoptions_array_int(void)
ZTEST(kconfigoptions, test_kconfigoptions_array_int)
{
zassert_equal(4194304, CONFIG_FLASH_CONTROLLER_SIZE,
"Unexpected flash controller size (%d)", CONFIG_FLASH_CONTROLLER_SIZE);
}
void test_main(void)
{
ztest_test_suite(kconfigoptions,
ztest_unit_test(test_kconfigoptions_array_hex),
ztest_unit_test(test_kconfigoptions_array_int)
);
ztest_run_test_suite(kconfigoptions);
}
ZTEST_SUITE(kconfigoptions, NULL, NULL, NULL, NULL, NULL);