mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
07736afe63f60e9cddd354a0a1de38cb95e921bb
This patch fixes testEqualIntArrays in the unity test suite on 16-bit
architectures.
TEST_ASSERT_EQUAL_INT_ARRAY calls UnityAssertEqualIntArray with 'style'
set to UNITY_DISPLAY_STYLE_INT.
UNITY_DISPLAY_STYLE_INT is defined as UNITY_DISPLAY_STYLE_AUTO +
UNITY_DISPLAY_STYLE_INT{16,32,64} (depending on the int width).
However, the switch statement in UnityAssertEqualIntArray has special
cases for the width-specific display styles, but these comparisons
are carried out without clearing the UNITY_DISPLAY_STYLE_AUTO flag.
This means that if 'style' is UNITY_DISPLAY_STYLE_INT, and the int
width is, say, 16, bits, the default case will be hit, and elements
compared as if they were 32 bits wide. Unsurprisingly this causes
a failure in the test named above.
Description
No description provided
Languages
C
65.4%
Ruby
17%
C++
13%
Python
1.7%
Makefile
1.5%
Other
1.4%