Skip to content

Issue in printing values when using TEST_ASSERT_EQUAL_UINT8_ARRAY #807

@wm-eisos

Description

@wm-eisos

Description

There is an issue with using TEST_ASSERT_EQUAL_UINT8_ARRAY since it will internally attempt to print the mismatching values as shown

Unity/src/unity.c

Lines 958 to 965 in 0d7ea70

UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected);
UnityPrintIntNumberByStyle(expect_val, style);
UnityPrint(UnityStrWas);
UnityPrintIntNumberByStyle(actual_val, style);
UnityAddMsgIfSpecified(msg);

however that call should depend on whether its a uint or int similar to what was done here #784

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions