mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-24 17:09:28 +08:00
Merge pull request #45 from canton7/feature/16bitIntArrayEqual
Fix TEST_ASSERT_EQUAL_INT_ARRAY for int sizes other than 32 bits (Thanks Canton7)
This commit is contained in:
@ -425,7 +425,10 @@ void UnityAssertEqualIntArray(const _U_SINT* expected,
|
|||||||
if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
|
if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(style)
|
// If style is UNITY_DISPLAY_STYLE_INT, we'll fall into the default case rather than the INT16 or INT32 (etc) case
|
||||||
|
// 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_RANGE_AUTO)
|
||||||
{
|
{
|
||||||
case UNITY_DISPLAY_STYLE_HEX8:
|
case UNITY_DISPLAY_STYLE_HEX8:
|
||||||
case UNITY_DISPLAY_STYLE_INT8:
|
case UNITY_DISPLAY_STYLE_INT8:
|
||||||
|
Reference in New Issue
Block a user