For tests, rename ASSERT_COMPARE() to TEST_BUFFERS_EQUAL()
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
parent
ed70fd0c39
commit
65cd8519f7
39 changed files with 418 additions and 416 deletions
|
@ -166,14 +166,16 @@
|
|||
* \param size2 Size of the second buffer in bytes.
|
||||
* This expression may be evaluated multiple times.
|
||||
*/
|
||||
#define ASSERT_COMPARE(p1, size1, p2, size2) \
|
||||
do \
|
||||
{ \
|
||||
#define TEST_BUFFERS_EQUAL(p1, size1, p2, size2) \
|
||||
do { \
|
||||
TEST_EQUAL((size1), (size2)); \
|
||||
if ((size1) != 0) \
|
||||
TEST_ASSERT(memcmp((p1), (p2), (size1)) == 0); \
|
||||
} \
|
||||
while (0)
|
||||
if ((size1) != 0) { \
|
||||
TEST_ASSERT(memcmp((p1), (p2), (size1)) == 0); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* For backwards compatibility */
|
||||
#define ASSERT_COMPARE(p1, size1, p2, size2) TEST_BUFFERS_EQUAL(p1, size1, p2, size2)
|
||||
|
||||
/**
|
||||
* \brief This macro tests the expression passed to it and skips the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue