Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b60dbc

Browse filesBrowse files
nodejs-github-bottargos
authored andcommitted
deps: update googletest to 4565741
PR-URL: #51657 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 5d3ee72 commit 3b60dbc
Copy full SHA for 3b60dbc

File tree

Expand file treeCollapse file tree

1 file changed

+14
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-4
lines changed
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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.