deps: update googletest to 8eff9e336692fc95961e096564f1044c600b881d · nodejs/node@e8edeff · GitHub
Skip to content

Commit e8edeff

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update googletest to 8eff9e336692fc95961e096564f1044c600b881d
PR-URL: #66009 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3a69cc1 commit e8edeff

5 files changed

Lines changed: 43 additions & 307 deletions

File tree

‎deps/googletest/include/gtest/gtest-death-test.h‎

Lines changed: 4 additions & 48 deletions

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

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
177177
// GTEST_HAS_POSIX_RE (see above) which users can
178178
// define themselves.
179-
// GTEST_USES_SIMPLE_RE - our own simple regex is used;
179+
// GTEST_USES_STD_RE - std::regex from the C++ standard library is used;
180180
// the above RE\b(s) are mutually exclusive.
181181
// GTEST_HAS_ABSL - Google Test is compiled with Abseil.
182182

@@ -438,8 +438,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
438438
#include <regex.h> // NOLINT
439439
#define GTEST_USES_POSIX_RE 1
440440
#else
441-
// Use our own simple regex implementation.
442-
#define GTEST_USES_SIMPLE_RE 1
441+
// Use std::regex from the C++ standard library.
442+
#include <regex> // NOLINT
443+
#define GTEST_USES_STD_RE 1
443444
#endif
444445

445446
#ifndef GTEST_HAS_EXCEPTIONS
@@ -992,12 +993,11 @@ class GTEST_API_ [[nodiscard]] RE {
992993
RE2 regex_;
993994
};
994995

995-
#elif defined(GTEST_USES_POSIX_RE) || defined(GTEST_USES_SIMPLE_RE)
996+
#elif defined(GTEST_USES_POSIX_RE) || defined(GTEST_USES_STD_RE)
996997
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
997998
/* class A needs to have dll-interface to be used by clients of class B */)
998999

999-
// A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
1000-
// Regular Expression syntax.
1000+
// A simple C++ wrapper for <regex.h> or <regex>.
10011001
class GTEST_API_ [[nodiscard]] RE {
10021002
public:
10031003
// A copy constructor is required by the Standard to initialize object
@@ -1037,9 +1037,9 @@ class GTEST_API_ [[nodiscard]] RE {
10371037
regex_t full_regex_; // For FullMatch().
10381038
regex_t partial_regex_; // For PartialMatch().
10391039

1040-
#else // GTEST_USES_SIMPLE_RE
1040+
#else // GTEST_USES_STD_RE
10411041

1042-
std::string full_pattern_; // For FullMatch();
1042+
std::regex regex_;
10431043

10441044
#endif
10451045
};
@@ -1755,14 +1755,16 @@ class [[nodiscard]] MutexBase {
17551755
#define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
17561756
extern ::testing::internal::MutexBase mutex
17571757

1758+
#if defined(PTHREAD_NULL)
1759+
#define GTEST_INTERNAL_PTHREAD_NULL PTHREAD_NULL
1760+
#else
1761+
#define GTEST_INTERNAL_PTHREAD_NULL (pthread_t{})
1762+
#endif
1763+
17581764
// Defines and statically (i.e. at link time) initializes a static mutex.
1759-
// The initialization list here does not explicitly initialize each field,
1760-
// instead relying on default initialization for the unspecified fields. In
1761-
// particular, the owner_ field (a pthread_t) is not explicitly initialized.
1762-
// This allows initialization to work whether pthread_t is a scalar or struct.
1763-
// The flag -Wmissing-field-initializers must not be specified for this to work.
1764-
#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
1765-
::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0}
1765+
#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
1766+
::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, \
1767+
GTEST_INTERNAL_PTHREAD_NULL}
17661768

17671769
// The Mutex class can only be used for mutexes created at runtime. It
17681770
// shares its API with MutexBase otherwise.

‎deps/googletest/src/gtest-internal-inl.h‎

Lines changed: 1 addition & 20 deletions

0 commit comments

Comments
 (0)