1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-25 09:21:36 +01:00

Test for printing max width of a hex number, back to 100% test coverage

Correct clean target and print test fails during coverage in Makefile
This commit is contained in:
jsalling
2017-01-22 21:18:53 -06:00
parent ff03e1c915
commit b4f6afa4cf
2 changed files with 14 additions and 2 deletions

View File

@@ -2306,6 +2306,18 @@ void testCstringsEscapeSequence(void)
#endif
}
void testHexPrintsUpToMaxNumberOfNibbles(void)
{
#ifndef USING_OUTPUT_SPY
TEST_IGNORE();
#else
startPutcharSpy();
UnityPrintNumberHex(0xBEE, 21);
endPutcharSpy();
TEST_ASSERT_EQUAL_INT(sizeof(UNITY_INT)*2, strlen(getBufferPutcharSpy()));
#endif
}
#define TEST_ASSERT_EQUAL_PRINT_NUMBERS(expected, actual) { \
startPutcharSpy(); UnityPrintNumber((actual)); endPutcharSpy(); \
TEST_ASSERT_EQUAL_STRING((expected), getBufferPutcharSpy()); \