MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / PrintFailedTests

Method PrintFailedTests

tests/gtest/gtest-all.cc:4741–4763  ·  view source on GitHub ↗

Internal helper for printing the list of failed tests.

Source from the content-addressed store, hash-verified

4739
4740// Internal helper for printing the list of failed tests.
4741void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) {
4742 const int failed_test_count = unit_test.failed_test_count();
4743 if (failed_test_count == 0) {
4744 return;
4745 }
4746
4747 for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {
4748 const TestSuite& test_suite = *unit_test.GetTestSuite(i);
4749 if (!test_suite.should_run() || (test_suite.failed_test_count() == 0)) {
4750 continue;
4751 }
4752 for (int j = 0; j < test_suite.total_test_count(); ++j) {
4753 const TestInfo& test_info = *test_suite.GetTestInfo(j);
4754 if (!test_info.should_run() || !test_info.result()->Failed()) {
4755 continue;
4756 }
4757 ColoredPrintf(COLOR_RED, "[ FAILED ] ");
4758 printf("%s.%s", test_suite.name(), test_info.name());
4759 PrintFullTestCommentIfPresent(test_info);
4760 printf("\n");
4761 }
4762 }
4763}
4764
4765// Internal helper for printing the list of skipped tests.
4766void PrettyUnitTestResultPrinter::PrintSkippedTests(const UnitTest& unit_test) {

Callers

nothing calls this directly

Calls 8

ColoredPrintfFunction · 0.85
failed_test_countMethod · 0.80
GetTestSuiteMethod · 0.80
total_test_countMethod · 0.80
GetTestInfoMethod · 0.80
FailedMethod · 0.80

Tested by

no test coverage detected