MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / PrintFailedTests

Method PrintFailedTests

test/common/gtest/gtest.cpp:4605–4627  ·  view source on GitHub ↗

Internal helper for printing the list of failed tests.

Source from the content-addressed store, hash-verified

4603
4604// Internal helper for printing the list of failed tests.
4605void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {
4606 const int failed_test_count = unit_test.failed_test_count();
4607 if (failed_test_count == 0) {
4608 return;
4609 }
4610
4611 for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
4612 const TestCase& test_case = *unit_test.GetTestCase(i);
4613 if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {
4614 continue;
4615 }
4616 for (int j = 0; j < test_case.total_test_count(); ++j) {
4617 const TestInfo& test_info = *test_case.GetTestInfo(j);
4618 if (!test_info.should_run() || test_info.result()->Passed()) {
4619 continue;
4620 }
4621 ColoredPrintf(COLOR_RED, "[ FAILED ] ");
4622 printf("%s.%s", test_case.name(), test_info.name());
4623 PrintFullTestCommentIfPresent(test_info);
4624 printf("\n");
4625 }
4626 }
4627}
4628
4629void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
4630 int /*iteration*/) {

Callers

nothing calls this directly

Calls 9

ColoredPrintfFunction · 0.85
failed_test_countMethod · 0.80
total_test_case_countMethod · 0.80
GetTestCaseMethod · 0.80
total_test_countMethod · 0.80
GetTestInfoMethod · 0.80
PassedMethod · 0.80
nameMethod · 0.80

Tested by

no test coverage detected