mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-10-14 10:58:39 +08:00
Merge pull request #798 from ml-physec/fix-details-print
Update detail-stack implementation after #784
This commit is contained in:
@@ -33,7 +33,7 @@ void test_BitExtractor(void)
|
||||
{
|
||||
const test_vector_t test_vectors[] = {
|
||||
{__LINE__, 7, BIT_DIRECTION_UP, {1,1,1,0,0,0,0,0}},
|
||||
{__LINE__, 7, BIT_DIRECTION_DOWN, {0,0,0,0,0,1,0,1}},
|
||||
{__LINE__, 7, BIT_DIRECTION_DOWN, {0,0,0,0,0,1,0,1}}, /* intentionally wrong to demonstrate detail output */
|
||||
{0}
|
||||
};
|
||||
const test_vector_t* tv;
|
||||
|
@@ -601,7 +601,11 @@ static void UnityAddMsgIfSpecified(const char* msg)
|
||||
if ((label[0] == '#') && (label[1] != 0)) {
|
||||
UnityPrint(label + 2);
|
||||
UNITY_OUTPUT_CHAR(' ');
|
||||
UnityPrintNumberByStyle(Unity.CurrentDetailStackValues[c], label[1]);
|
||||
if ((label[1] & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) {
|
||||
UnityPrintIntNumberByStyle((UNITY_INT)Unity.CurrentDetailStackValues[c], label[1]);
|
||||
} else {
|
||||
UnityPrintUintNumberByStyle((UNITY_UINT)Unity.CurrentDetailStackValues[c], label[1]);
|
||||
}
|
||||
} else if (Unity.CurrentDetailStackValues[c] != 0){
|
||||
UnityPrint(label);
|
||||
UNITY_OUTPUT_CHAR(' ');
|
||||
|
Reference in New Issue
Block a user