diff options
author | Simon Glass <sjg@chromium.org> | 2020-05-10 12:52:45 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-19 14:01:47 -0400 |
commit | f91f366bd56ef290b7b1f24a40a8be02c148d6d9 (patch) | |
tree | d7c6b993a6fd5f5a4dea7731855baabde6ff16b1 /test/compression.c | |
parent | d934b43a0294148267c88f22d47aa2ebd77512a5 (diff) |
test: Use ut_asserteq_mem() where possible
Quite a few tests still use ut_assertok(memcmp(...)) and variants. Modify
them to use the macro designed for this purpose.
Suggested-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'test/compression.c')
-rw-r--r-- | test/compression.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/compression.c b/test/compression.c index ad719ddb4d..a2a4b9ff9e 100644 --- a/test/compression.c +++ b/test/compression.c @@ -164,7 +164,7 @@ static int compress_using_bzip2(struct unit_test_state *uts, { /* There is no bzip2 compression in u-boot, so fake it. */ ut_asserteq(in_size, strlen(plain)); - ut_asserteq(0, memcmp(plain, in, in_size)); + ut_asserteq_mem(plain, in, in_size); if (bzip2_compressed_size > out_max) return -1; @@ -199,7 +199,7 @@ static int compress_using_lzma(struct unit_test_state *uts, { /* There is no lzma compression in u-boot, so fake it. */ ut_asserteq(in_size, strlen(plain)); - ut_asserteq(0, memcmp(plain, in, in_size)); + ut_asserteq_mem(plain, in, in_size); if (lzma_compressed_size > out_max) return -1; @@ -233,7 +233,7 @@ static int compress_using_lzo(struct unit_test_state *uts, { /* There is no lzo compression in u-boot, so fake it. */ ut_asserteq(in_size, strlen(plain)); - ut_asserteq(0, memcmp(plain, in, in_size)); + ut_asserteq_mem(plain, in, in_size); if (lzo_compressed_size > out_max) return -1; @@ -268,7 +268,7 @@ static int compress_using_lz4(struct unit_test_state *uts, { /* There is no lz4 compression in u-boot, so fake it. */ ut_asserteq(in_size, strlen(plain)); - ut_asserteq(0, memcmp(plain, in, in_size)); + ut_asserteq_mem(plain, in, in_size); if (lz4_compressed_size > out_max) return -1; |