summaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/ofnode.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 44e51de085..49efabe871 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -318,3 +318,18 @@ static int dm_test_ofnode_get_path(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_ofnode_get_path, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
+
+static int dm_test_ofnode_conf(struct unit_test_state *uts)
+{
+ ut_assert(!ofnode_conf_read_bool("missing"));
+ ut_assert(ofnode_conf_read_bool("testing-bool"));
+
+ ut_asserteq(123, ofnode_conf_read_int("testing-int", 0));
+ ut_asserteq(6, ofnode_conf_read_int("missing", 6));
+
+ ut_assertnull(ofnode_conf_read_str("missing"));
+ ut_asserteq_str("testing", ofnode_conf_read_str("testing-str"));
+
+ return 0;
+}
+DM_TEST(dm_test_ofnode_conf, 0);