Simon Glass | 217293e | 2020-10-25 20:38:29 -0600 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | #include <common.h> |
| 4 | #include <dm.h> |
| 5 | #include <dm/test.h> |
| 6 | #include <test/test.h> |
| 7 | #include <test/ut.h> |
| 8 | |
| 9 | /* Test that we can find a device using of-platdata */ |
| 10 | static int dm_test_of_platdata_base(struct unit_test_state *uts) |
| 11 | { |
| 12 | struct udevice *dev; |
| 13 | |
| 14 | ut_assertok(uclass_first_device_err(UCLASS_SERIAL, &dev)); |
| 15 | ut_asserteq_str("sandbox_serial", dev->name); |
| 16 | |
| 17 | return 0; |
| 18 | } |
| 19 | DM_TEST(dm_test_of_platdata_base, UT_TESTF_SCAN_PDATA); |