mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-24 17:09:28 +08:00
Merge pull request #238 from jsalling/refactor/int-array
Thanks for the walkthrough (and all the original work!). Your logic seems solid to me. :)
This commit is contained in:
138
src/unity.c
138
src/unity.c
@ -580,12 +580,11 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
|
|||||||
const UNITY_DISPLAY_STYLE_T style)
|
const UNITY_DISPLAY_STYLE_T style)
|
||||||
{
|
{
|
||||||
UNITY_UINT32 elements = num_elements;
|
UNITY_UINT32 elements = num_elements;
|
||||||
UNITY_INTERNAL_PTR ptr_exp = (UNITY_INTERNAL_PTR)expected;
|
unsigned int length = style & 0xF;
|
||||||
UNITY_INTERNAL_PTR ptr_act = (UNITY_INTERNAL_PTR)actual;
|
|
||||||
|
|
||||||
UNITY_SKIP_EXECUTION;
|
UNITY_SKIP_EXECUTION;
|
||||||
|
|
||||||
if (elements == 0)
|
if (num_elements == 0)
|
||||||
{
|
{
|
||||||
UnityPrintPointlessAndBail();
|
UnityPrintPointlessAndBail();
|
||||||
}
|
}
|
||||||
@ -593,95 +592,54 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
|
|||||||
if (UnityCheckArraysForNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg) == 1)
|
if (UnityCheckArraysForNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg) == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If style is UNITY_DISPLAY_STYLE_INT, we'll fall into the default case rather than the INT16 or INT32 (etc) case
|
while (elements--)
|
||||||
* as UNITY_DISPLAY_STYLE_INT includes a flag for UNITY_DISPLAY_RANGE_AUTO, which the width-specific
|
|
||||||
* variants do not. Therefore remove this flag. */
|
|
||||||
switch(style & (UNITY_DISPLAY_STYLE_T)(~UNITY_DISPLAY_RANGE_AUTO))
|
|
||||||
{
|
{
|
||||||
case UNITY_DISPLAY_STYLE_HEX8:
|
UNITY_INT expect_val;
|
||||||
case UNITY_DISPLAY_STYLE_INT8:
|
UNITY_INT actual_val;
|
||||||
case UNITY_DISPLAY_STYLE_UINT8:
|
switch (length)
|
||||||
while (elements--)
|
{
|
||||||
{
|
case 1:
|
||||||
if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_act)
|
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
|
||||||
{
|
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
|
||||||
UnityTestResultsFailBegin(lineNumber);
|
break;
|
||||||
UnityPrint(UnityStrElement);
|
case 2:
|
||||||
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
|
||||||
UnityPrint(UnityStrExpected);
|
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_exp, style);
|
break;
|
||||||
UnityPrint(UnityStrWas);
|
default: /* length 4 bytes */
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_act, style);
|
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
|
||||||
UnityAddMsgIfSpecified(msg);
|
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
|
||||||
UNITY_FAIL_AND_BAIL;
|
length = 4;
|
||||||
}
|
break;
|
||||||
ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 1);
|
|
||||||
ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case UNITY_DISPLAY_STYLE_HEX16:
|
|
||||||
case UNITY_DISPLAY_STYLE_INT16:
|
|
||||||
case UNITY_DISPLAY_STYLE_UINT16:
|
|
||||||
while (elements--)
|
|
||||||
{
|
|
||||||
if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_act)
|
|
||||||
{
|
|
||||||
UnityTestResultsFailBegin(lineNumber);
|
|
||||||
UnityPrint(UnityStrElement);
|
|
||||||
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
|
||||||
UnityPrint(UnityStrExpected);
|
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_exp, style);
|
|
||||||
UnityPrint(UnityStrWas);
|
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_act, style);
|
|
||||||
UnityAddMsgIfSpecified(msg);
|
|
||||||
UNITY_FAIL_AND_BAIL;
|
|
||||||
}
|
|
||||||
ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 2);
|
|
||||||
ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 2);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#ifdef UNITY_SUPPORT_64
|
#ifdef UNITY_SUPPORT_64
|
||||||
case UNITY_DISPLAY_STYLE_HEX64:
|
case 8:
|
||||||
case UNITY_DISPLAY_STYLE_INT64:
|
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
|
||||||
case UNITY_DISPLAY_STYLE_UINT64:
|
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
|
||||||
while (elements--)
|
break;
|
||||||
{
|
|
||||||
if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_act)
|
|
||||||
{
|
|
||||||
UnityTestResultsFailBegin(lineNumber);
|
|
||||||
UnityPrint(UnityStrElement);
|
|
||||||
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
|
||||||
UnityPrint(UnityStrExpected);
|
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_exp, style);
|
|
||||||
UnityPrint(UnityStrWas);
|
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_act, style);
|
|
||||||
UnityAddMsgIfSpecified(msg);
|
|
||||||
UNITY_FAIL_AND_BAIL;
|
|
||||||
}
|
|
||||||
ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 8);
|
|
||||||
ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 8);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
default:
|
}
|
||||||
while (elements--)
|
|
||||||
{
|
if (expect_val != actual_val)
|
||||||
if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_act)
|
{
|
||||||
{
|
if (style & UNITY_DISPLAY_RANGE_UINT && length < sizeof expect_val)
|
||||||
UnityTestResultsFailBegin(lineNumber);
|
{ /* For UINT, remove sign extension (padding 1's) from signed type casts above */
|
||||||
UnityPrint(UnityStrElement);
|
UNITY_INT mask = 1;
|
||||||
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
mask = (mask << 8 * length) - 1;
|
||||||
UnityPrint(UnityStrExpected);
|
expect_val &= mask;
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_exp, style);
|
actual_val &= mask;
|
||||||
UnityPrint(UnityStrWas);
|
|
||||||
UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_act, style);
|
|
||||||
UnityAddMsgIfSpecified(msg);
|
|
||||||
UNITY_FAIL_AND_BAIL;
|
|
||||||
}
|
|
||||||
ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 4);
|
|
||||||
ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 4);
|
|
||||||
}
|
}
|
||||||
break;
|
UnityTestResultsFailBegin(lineNumber);
|
||||||
|
UnityPrint(UnityStrElement);
|
||||||
|
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
||||||
|
UnityPrint(UnityStrExpected);
|
||||||
|
UnityPrintNumberByStyle(expect_val, style);
|
||||||
|
UnityPrint(UnityStrWas);
|
||||||
|
UnityPrintNumberByStyle(actual_val, style);
|
||||||
|
UnityAddMsgIfSpecified(msg);
|
||||||
|
UNITY_FAIL_AND_BAIL;
|
||||||
|
}
|
||||||
|
expected = (UNITY_INTERNAL_PTR)(length + (const char*)expected);
|
||||||
|
actual = (UNITY_INTERNAL_PTR)(length + (const char*)actual);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1194,8 +1152,8 @@ void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
|
|||||||
UnityAddMsgIfSpecified(msg);
|
UnityAddMsgIfSpecified(msg);
|
||||||
UNITY_FAIL_AND_BAIL;
|
UNITY_FAIL_AND_BAIL;
|
||||||
}
|
}
|
||||||
ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 1);
|
ptr_exp++;
|
||||||
ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 1);
|
ptr_act++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,13 +140,10 @@
|
|||||||
*-------------------------------------------------------*/
|
*-------------------------------------------------------*/
|
||||||
|
|
||||||
#if (UNITY_POINTER_WIDTH == 32)
|
#if (UNITY_POINTER_WIDTH == 32)
|
||||||
typedef UNITY_UINT32 UNITY_PTR;
|
|
||||||
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
|
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
|
||||||
#elif (UNITY_POINTER_WIDTH == 64)
|
#elif (UNITY_POINTER_WIDTH == 64)
|
||||||
typedef UNITY_UINT64 UNITY_PTR;
|
|
||||||
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
|
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
|
||||||
#elif (UNITY_POINTER_WIDTH == 16)
|
#elif (UNITY_POINTER_WIDTH == 16)
|
||||||
typedef UNITY_UINT16 UNITY_PTR;
|
|
||||||
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
|
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
|
||||||
#else
|
#else
|
||||||
#error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
|
#error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
|
||||||
@ -158,7 +155,6 @@
|
|||||||
|
|
||||||
#ifndef UNITY_INTERNAL_PTR
|
#ifndef UNITY_INTERNAL_PTR
|
||||||
#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void*
|
#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void*
|
||||||
/* #define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const UNITY_UINT8* */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-------------------------------------------------------
|
/*-------------------------------------------------------
|
||||||
@ -334,11 +330,10 @@ typedef void (*UnityTestFunction)(void);
|
|||||||
#define UNITY_DISPLAY_RANGE_INT (0x10)
|
#define UNITY_DISPLAY_RANGE_INT (0x10)
|
||||||
#define UNITY_DISPLAY_RANGE_UINT (0x20)
|
#define UNITY_DISPLAY_RANGE_UINT (0x20)
|
||||||
#define UNITY_DISPLAY_RANGE_HEX (0x40)
|
#define UNITY_DISPLAY_RANGE_HEX (0x40)
|
||||||
#define UNITY_DISPLAY_RANGE_AUTO (0x80)
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
UNITY_DISPLAY_STYLE_INT = sizeof(int)+ UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
|
UNITY_DISPLAY_STYLE_INT = sizeof(int)+ UNITY_DISPLAY_RANGE_INT,
|
||||||
UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
|
UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
|
||||||
UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
|
UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
|
||||||
UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
|
UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
|
||||||
@ -346,7 +341,7 @@ UNITY_DISPLAY_STYLE_INT = sizeof(int)+ UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_R
|
|||||||
UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
|
UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UNITY_DISPLAY_STYLE_UINT = sizeof(unsigned) + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
|
UNITY_DISPLAY_STYLE_UINT = sizeof(unsigned) + UNITY_DISPLAY_RANGE_UINT,
|
||||||
UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
|
UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
|
||||||
UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
|
UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
|
||||||
UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
|
UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
|
||||||
@ -648,7 +643,7 @@ int UnityTestMatches(void);
|
|||||||
#define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
|
#define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
|
||||||
#define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
|
#define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
|
||||||
|
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(UNITY_PTR)(expected), (UNITY_INT)(UNITY_PTR)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
|
#define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)(line))
|
#define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)(line))
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, message) UnityAssertEqualStringLen((const char*)(expected), (const char*)(actual), (UNITY_UINT32)(len), (message), (UNITY_LINE_TYPE)(line))
|
#define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, message) UnityAssertEqualStringLen((const char*)(expected), (const char*)(actual), (UNITY_UINT32)(len), (message), (UNITY_LINE_TYPE)(line))
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), 1, (message), (UNITY_LINE_TYPE)(line))
|
#define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), 1, (message), (UNITY_LINE_TYPE)(line))
|
||||||
@ -664,7 +659,7 @@ int UnityTestMatches(void);
|
|||||||
#define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
|
#define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
|
#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
|
#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(UNITY_PTR*)(expected), (UNITY_INTERNAL_PTR)(UNITY_PTR*)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
|
#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((const char**)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line))
|
#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((const char**)(expected), (const char**)(actual), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line))
|
||||||
#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line))
|
#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user