1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-24 17:01:35 +01:00

prepare for comparing value to array by setting up explicit compare of array to array in ints

This commit is contained in:
Mark VanderVoord
2017-03-21 08:00:48 -04:00
parent 7b80885c68
commit 56eeacd0b2
2 changed files with 44 additions and 18 deletions

View File

@@ -539,7 +539,8 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
const UNITY_UINT32 num_elements,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
const UNITY_DISPLAY_STYLE_T style,
const UNITY_FLAGS_T flags)
{
UNITY_UINT32 elements = num_elements;
unsigned int length = style & 0xF;
@@ -601,7 +602,10 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
expected = (UNITY_INTERNAL_PTR)(length + (const char*)expected);
if (flags == UNITY_ARRAY_TO_ARRAY)
{
expected = (UNITY_INTERNAL_PTR)(length + (const char*)expected);
}
actual = (UNITY_INTERNAL_PTR)(length + (const char*)actual);
}
}