Skip to content

Commit

Permalink
Merge pull request #1393 from dmknutsen/Issue_1392
Browse files Browse the repository at this point in the history
Fix #1392, Add additional counters to test summary
  • Loading branch information
dzbaker committed May 26, 2023
2 parents 5036fed + cfacbda commit 23f3963
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions ut_assert/src/utassert.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,24 @@ void UtAssert_DoTestSegmentReport(const char *SegmentName, const UtAssert_TestCo
char ReportBuffer[144];

snprintf(ReportBuffer, sizeof(ReportBuffer),
"%02u %-20s TOTAL::%-4u PASS::%-4u FAIL::%-4u MIR::%-4u TSF::%-4u TTF::%-4u WARN::%-4u\n",
"%-22s ABORT::%-4u WARN::%-4u FLOW::%-4u DEBUG::%-4u N/A::%-4u",
"",
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_ABORT],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_WARN],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_FLOW],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_DEBUG],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_NA]);

UT_BSP_DoText(UTASSERT_CASETYPE_INFO, ReportBuffer);

snprintf(ReportBuffer, sizeof(ReportBuffer),
"%02u %-20s TOTAL::%-4u PASS::%-4u FAIL::%-4u MIR::%-4u TSF::%-4u TTF::%-4u",
(unsigned int)TestCounters->TestSegmentCount, SegmentName, (unsigned int)TestCounters->TotalTestCases,
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_PASS],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_FAILURE],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_MIR],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_TSF],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_TTF],
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_WARN]);
(unsigned int)TestCounters->CaseCount[UTASSERT_CASETYPE_TTF]);

UT_BSP_DoText(UTASSERT_CASETYPE_END, ReportBuffer);
}
Expand Down

0 comments on commit 23f3963

Please sign in to comment.