Commit d41c56c4 authored by Enjia Mai's avatar Enjia Mai Committed by Maureen Helm
Browse files

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: default avatarEnjia Mai <enjia.mai@intel.com>
parent 44a1212b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
+3 −10
Original line number Diff line number Diff line
@@ -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);