1 // SPDX-License-Identifier: GPL-2.0+
4 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
13 #include "../../drivers/board/sandbox.h"
15 static int dm_test_board(struct unit_test_state *uts)
17 struct udevice *board;
25 board_get_bool(board, BOOL_CALLED_DETECT, &called_detect);
26 ut_assert(!called_detect);
30 board_get_bool(board, BOOL_CALLED_DETECT, &called_detect);
31 ut_assert(called_detect);
33 board_get_str(board, STR_VACATIONSPOT, sizeof(str), str);
34 ut_assertok(strcmp(str, "R'lyeh"));
36 board_get_int(board, INT_TEST1, &i);
39 board_get_int(board, INT_TEST2, &i);
42 board_get_str(board, STR_VACATIONSPOT, sizeof(str), str);
43 ut_assertok(strcmp(str, "Carcosa"));
45 board_get_int(board, INT_TEST1, &i);
48 board_get_int(board, INT_TEST2, &i);
51 board_get_str(board, STR_VACATIONSPOT, sizeof(str), str);
52 ut_assertok(strcmp(str, "Yuggoth"));
57 DM_TEST(dm_test_board, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);