mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-12-17 14:00:03 +08:00
Added memory each equal assertion
This commit is contained in:
@@ -1079,7 +1079,8 @@ void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
|
||||
const UNITY_UINT32 length,
|
||||
const UNITY_UINT32 num_elements,
|
||||
const char* msg,
|
||||
const UNITY_LINE_TYPE lineNumber)
|
||||
const UNITY_LINE_TYPE lineNumber,
|
||||
const UNITY_FLAGS_T flags)
|
||||
{
|
||||
UNITY_PTR_ATTRIBUTE const unsigned char* ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
|
||||
UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
|
||||
@@ -1123,6 +1124,10 @@ void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
|
||||
ptr_exp++;
|
||||
ptr_act++;
|
||||
}
|
||||
if (flags == UNITY_ARRAY_TO_VAL)
|
||||
{
|
||||
ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user