diff options
Diffstat (limited to 'test/unicode_ut.c')
-rw-r--r-- | test/unicode_ut.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/unicode_ut.c b/test/unicode_ut.c index d8b4aa9b44..26d96336f3 100644 --- a/test/unicode_ut.c +++ b/test/unicode_ut.c @@ -9,6 +9,7 @@ #include <charset.h> #include <command.h> #include <errno.h> +#include <log.h> #include <malloc.h> #include <test/test.h> #include <test/suites.h> @@ -66,8 +67,9 @@ static int unicode_test_u16_strdup(struct unit_test_state *uts) u16 *copy = u16_strdup(c4); ut_assert(copy != c4); - ut_assert(!memcmp(copy, c4, sizeof(c4))); + ut_asserteq_mem(copy, c4, sizeof(c4)); free(copy); + return 0; } UNICODE_TEST(unicode_test_u16_strdup); @@ -79,7 +81,8 @@ static int unicode_test_u16_strcpy(struct unit_test_state *uts) r = u16_strcpy(copy, c1); ut_assert(r == copy); - ut_assert(!memcmp(copy, c1, sizeof(c1))); + ut_asserteq_mem(copy, c1, sizeof(c1)); + return 0; } UNICODE_TEST(unicode_test_u16_strcpy); @@ -591,7 +594,7 @@ static int unicode_test_u16_strsize(struct unit_test_state *uts) } UNICODE_TEST(unicode_test_u16_strsize); -int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct unit_test *tests = ll_entry_start(struct unit_test, unicode_test); const int n_ents = ll_entry_count(struct unit_test, unicode_test); |