tests: devicetree: add tests for DT_GPARENT/DT_INST_GPARENT
Add some coverage for the DT_GPARENT/DT_INST_GPARENT macros. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
9e2dad91b4
commit
5710f609c9
1 changed files with 9 additions and 0 deletions
|
@ -1773,6 +1773,15 @@ ZTEST(devicetree_api, test_parent)
|
||||||
TEST_SPI_BUS_0), "");
|
TEST_SPI_BUS_0), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef DT_DRV_COMPAT
|
||||||
|
#define DT_DRV_COMPAT vnd_i2c_mux_controller
|
||||||
|
ZTEST(devicetree_api, test_gparent)
|
||||||
|
{
|
||||||
|
zassert_true(DT_SAME_NODE(DT_GPARENT(TEST_I2C_MUX_CTLR_1), TEST_I2C), "");
|
||||||
|
zassert_true(DT_SAME_NODE(DT_INST_GPARENT(0), TEST_I2C), "");
|
||||||
|
zassert_true(DT_SAME_NODE(DT_INST_GPARENT(1), TEST_I2C), "");
|
||||||
|
}
|
||||||
|
|
||||||
#undef DT_DRV_COMPAT
|
#undef DT_DRV_COMPAT
|
||||||
#define DT_DRV_COMPAT vnd_child_bindings
|
#define DT_DRV_COMPAT vnd_child_bindings
|
||||||
ZTEST(devicetree_api, test_children)
|
ZTEST(devicetree_api, test_children)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue