test: Add some tests for setexpr
This command currently has no tests. Add some for basic assignment and the integer operations. Note that the default size for setexpr is ulong, which varies depending on the build machine. So for sandbox on a 64-bit host, this means that the default size is 64 bits. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -75,6 +75,8 @@ static struct cmd_tbl cmd_ut_sub[] = {
|
||||
U_BOOT_CMD_MKENT(log, CONFIG_SYS_MAXARGS, 1, do_ut_log, "", ""),
|
||||
#endif
|
||||
U_BOOT_CMD_MKENT(mem, CONFIG_SYS_MAXARGS, 1, do_ut_mem, "", ""),
|
||||
U_BOOT_CMD_MKENT(setexpr, CONFIG_SYS_MAXARGS, 1, do_ut_setexpr, "",
|
||||
""),
|
||||
#ifdef CONFIG_UT_TIME
|
||||
U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""),
|
||||
#endif
|
||||
@@ -153,6 +155,7 @@ static char ut_help_text[] =
|
||||
#ifdef CONFIG_UT_OVERLAY
|
||||
"ut overlay [test-name]\n"
|
||||
#endif
|
||||
"ut setexpr [test-name] - test setexpr command\n"
|
||||
#ifdef CONFIG_SANDBOX
|
||||
"ut str - Basic test of string functions\n"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user