mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-25 17:31: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:
@@ -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()); \
|
||||
|
||||
Reference in New Issue
Block a user