GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: update googletest to 4565741 · nodejs/node@3b60dbc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/googletest/src
    • gtest.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/googletest/src/gtest.cc‎

Copy file name to clipboardExpand all lines: deps/googletest/src/gtest.cc
+14-4Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,19 @@ static bool ShouldRunTestSuite(const TestSuite* test_suite) {
451451
return test_suite->should_run();
452452
}
453453

454+
namespace {
455+
456+
// Returns true if test part results of type `type` should include a stack
457+
// trace.
458+
bool ShouldEmitStackTraceForResultType(TestPartResult::Type type) {
459+
// Suppress emission of the stack trace for SUCCEED() since it likely never
460+
// requires investigation, and GTEST_SKIP() since skipping is an intentional
461+
// act by the developer rather than a failure requiring investigation.
462+
return type != TestPartResult::kSuccess && type != TestPartResult::kSkip;
463+
}
464+
465+
} // namespace
466+
454467
// AssertHelper constructor.
455468
AssertHelper::AssertHelper(TestPartResult::Type type, const char* file,
456469
int line, const char* message)
@@ -463,10 +476,7 @@ void AssertHelper::operator=(const Message& message) const {
463476
UnitTest::GetInstance()->AddTestPartResult(
464477
data_->type, data_->file, data_->line,
465478
AppendUserMessage(data_->message, message),
466-
// Suppress emission of the stack trace for GTEST_SKIP() since skipping is
467-
// an intentional act by the developer rather than a failure requiring
468-
// investigation.
469-
data_->type != TestPartResult::kSkip
479+
ShouldEmitStackTraceForResultType(data_->type)
470480
? UnitTest::GetInstance()->impl()->CurrentOsStackTraceExceptTop(1)
471481
: ""
472482
// Skips the stack frame for this function itself.

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.