mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
d934b43a02
commit
f91f366bd5
11 changed files with 109 additions and 99 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue