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 241a6b7

Browse filesBrowse files
nodejs-github-botaduh95
authored andcommitted
deps: update googletest to 5a9c3f9e8d9b90bbbe8feb32902146cb8f7c1757
PR-URL: #61731 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d2fef4a commit 241a6b7
Copy full SHA for 241a6b7

2 files changed

+9-8Lines changed: 9 additions & 8 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/googletest/include/gtest/internal/gtest-port.h‎

Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,13 +1515,13 @@ class [[nodiscard]] ThreadWithParam : public ThreadWithParamBase {
15151515

15161516
ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
15171517
: ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {}
1518-
~ThreadWithParam() override {}
1518+
~ThreadWithParam() override = default;
15191519

15201520
private:
15211521
class RunnableImpl : public Runnable {
15221522
public:
15231523
RunnableImpl(UserThreadFunc* func, T param) : func_(func), param_(param) {}
1524-
~RunnableImpl() override {}
1524+
~RunnableImpl() override = default;
15251525
void Run() override { func_(param_); }
15261526

15271527
private:
Collapse file

‎deps/googletest/src/gtest-port.cc‎

Copy file name to clipboardExpand all lines: deps/googletest/src/gtest-port.cc
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
#include "gtest/gtest-message.h"
9191
#include "gtest/gtest-spi.h"
92+
#include "gtest/gtest.h"
9293
#include "gtest/internal/gtest-internal.h"
9394
#include "gtest/internal/gtest-string.h"
9495
#include "src/gtest-internal-inl.h"
@@ -729,7 +730,7 @@ void RE::Init(const char* regex) {
729730
char* const full_pattern = new char[full_regex_len];
730731

731732
snprintf(full_pattern, full_regex_len, "^(%s)$", regex);
732-
is_valid_ = regcomp(&full_regex_, full_pattern, reg_flags) == 0;
733+
int error = regcomp(&full_regex_, full_pattern, reg_flags);
733734
// We want to call regcomp(&partial_regex_, ...) even if the
734735
// previous expression returns false. Otherwise partial_regex_ may
735736
// not be properly initialized can may cause trouble when it's
@@ -738,13 +739,13 @@ void RE::Init(const char* regex) {
738739
// Some implementation of POSIX regex (e.g. on at least some
739740
// versions of Cygwin) doesn't accept the empty string as a valid
740741
// regex. We change it to an equivalent form "()" to be safe.
741-
if (is_valid_) {
742+
if (!error) {
742743
const char* const partial_regex = (*regex == '\0') ? "()" : regex;
743-
is_valid_ = regcomp(&partial_regex_, partial_regex, reg_flags) == 0;
744+
error = regcomp(&partial_regex_, partial_regex, reg_flags);
744745
}
745-
EXPECT_TRUE(is_valid_)
746-
<< "Regular expression \"" << regex
747-
<< "\" is not a valid POSIX Extended regular expression.";
746+
is_valid_ = error == 0;
747+
EXPECT_EQ(error, 0) << "Regular expression \"" << regex
748+
<< "\" is not a valid POSIX Extended regular expression.";
748749

749750
delete[] full_pattern;
750751
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.