tests: lib: devicetree: move api_ext to new ztest API

Move test lib/devicetree/api_ext to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
This commit is contained in:
li biao 2022-07-11 15:38:28 +08:00 committed by Marti Bolivar
commit 3e87adc8bc
2 changed files with 3 additions and 8 deletions

View file

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

View file

@ -15,16 +15,10 @@
#define TEST_SRAM1 DT_NODELABEL(test_sram1)
#define TEST_SRAM2 DT_NODELABEL(test_sram2)
static void test_linker_regions(void)
ZTEST(devicetree_api_ext, test_linker_regions)
{
zassert_true(!strcmp(LINKER_DT_NODE_REGION_NAME(TEST_SRAM1), "SRAM_REGION"), "");
zassert_true(!strcmp(LINKER_DT_NODE_REGION_NAME(TEST_SRAM2), "SRAM_REGION_2"), "");
}
void test_main(void)
{
ztest_test_suite(devicetree_api_ext,
ztest_unit_test(test_linker_regions)
);
ztest_run_test_suite(devicetree_api_ext);
}
ZTEST_SUITE(devicetree_api_ext, NULL, NULL, NULL, NULL, NULL);