tests: devicetree: add tests for DT_INST_PROP_LEN_OR
Add test coverage for the DT_INST_PROP_LEN_OR macro. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
6c0626215b
commit
85d8f8e0db
1 changed files with 5 additions and 0 deletions
|
@ -214,6 +214,11 @@ ZTEST(devicetree_api, test_default_prop_access)
|
|||
zassert_equal(DT_INST_PROP_OR(0, misc_prop, X), 1234, "");
|
||||
zassert_equal(DT_INST_PROP_OR(0, not_a_property, -1), -1, "");
|
||||
|
||||
#undef DT_DRV_COMPAT
|
||||
#define DT_DRV_COMPAT vnd_array_holder
|
||||
zassert_equal(DT_INST_PROP_LEN_OR(0, a, X), 3, "");
|
||||
zassert_equal(DT_INST_PROP_LEN_OR(0, not_a_property, -1), -1, "");
|
||||
|
||||
#undef DT_DRV_COMPAT
|
||||
#define DT_DRV_COMPAT vnd_adc_temp_sensor
|
||||
zassert_equal(DT_INST_PHA_BY_IDX_OR(0, dmas, 1, channel, X), 3, "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue