MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / PrintFailedTests

Method PrintFailedTests

rtpose_wrapper/src/gtest/gtest-all.cpp:4133–4155  ·  view source on GitHub ↗

Internal helper for printing the list of failed tests.

Source from the content-addressed store, hash-verified

4131
4132// Internal helper for printing the list of failed tests.
4133void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {
4134 const int failed_test_count = unit_test.failed_test_count();
4135 if (failed_test_count == 0) {
4136 return;
4137 }
4138
4139 for (int i = 0; i < unit_test.total_test_case_count(); ++i) {
4140 const TestCase& test_case = *unit_test.GetTestCase(i);
4141 if (!test_case.should_run() || (test_case.failed_test_count() == 0)) {
4142 continue;
4143 }
4144 for (int j = 0; j < test_case.total_test_count(); ++j) {
4145 const TestInfo& test_info = *test_case.GetTestInfo(j);
4146 if (!test_info.should_run() || test_info.result()->Passed()) {
4147 continue;
4148 }
4149 ColoredPrintf(COLOR_RED, "[ FAILED ] ");
4150 printf("%s.%s", test_case.name(), test_info.name());
4151 PrintFullTestCommentIfPresent(test_info);
4152 printf("\n");
4153 }
4154 }
4155}
4156
4157void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
4158 int /*iteration*/) {

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected