tests: misc: kconfigoptions: test new options
Test new kconfig options. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
999afdc728
commit
a18761e298
|
@ -13,6 +13,21 @@ config FLASH_CONTROLLER_SIZE
|
||||||
int
|
int
|
||||||
default $(dt_node_array_prop_int,$(DT_FLASH_CONTROLLER),reg,1)
|
default $(dt_node_array_prop_int,$(DT_FLASH_CONTROLLER),reg,1)
|
||||||
|
|
||||||
|
config FLASH_CONTROLLER_ADDR_INT_NODELABEL
|
||||||
|
int
|
||||||
|
default $(dt_nodelabel_reg_addr_int,flashcontroller0)
|
||||||
|
|
||||||
|
config FLASH_CONTROLLER_ADDR_HEX_NODELABEL
|
||||||
|
hex
|
||||||
|
default $(dt_nodelabel_reg_addr_hex,flashcontroller0)
|
||||||
|
|
||||||
|
config FLASH_CONTROLLER_SIZE_INT_NODELABEL
|
||||||
|
int
|
||||||
|
default $(dt_nodelabel_reg_size_int,flashcontroller0)
|
||||||
|
|
||||||
|
config FLASH_CONTROLLER_SIZE_HEX_NODELABEL
|
||||||
|
hex
|
||||||
|
default $(dt_nodelabel_reg_size_hex,flashcontroller0)
|
||||||
|
|
||||||
menu "Zephyr Kernel"
|
menu "Zephyr Kernel"
|
||||||
source "Kconfig.zephyr"
|
source "Kconfig.zephyr"
|
||||||
|
|
|
@ -22,4 +22,16 @@ ZTEST(kconfigoptions, test_kconfigoptions_array_int)
|
||||||
"Unexpected flash controller size (%d)", CONFIG_FLASH_CONTROLLER_SIZE);
|
"Unexpected flash controller size (%d)", CONFIG_FLASH_CONTROLLER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZTEST(kconfigoptions, test_kconfigoptions_addr_nodelabel)
|
||||||
|
{
|
||||||
|
zassert_equal(1, CONFIG_FLASH_CONTROLLER_ADDR_INT_NODELABEL, "Unexpected value");
|
||||||
|
zassert_equal(1, CONFIG_FLASH_CONTROLLER_ADDR_HEX_NODELABEL, "Unexpected value");
|
||||||
|
}
|
||||||
|
|
||||||
|
ZTEST(kconfigoptions, test_kconfigoptions_size_nodelabel)
|
||||||
|
{
|
||||||
|
zassert_equal(4194304, CONFIG_FLASH_CONTROLLER_SIZE_INT_NODELABEL, "Unexpected value");
|
||||||
|
zassert_equal(4194304, CONFIG_FLASH_CONTROLLER_SIZE_HEX_NODELABEL, "Unexpected value");
|
||||||
|
}
|
||||||
|
|
||||||
ZTEST_SUITE(kconfigoptions, NULL, NULL, NULL, NULL, NULL);
|
ZTEST_SUITE(kconfigoptions, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
Loading…
Reference in a new issue