deps: update googletest to 8eff9e336692fc95961e096564f1044c600b881d by nodejs-github-bot · Pull Request #66009 · nodejs/node · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 4 additions & 48 deletions deps/googletest/include/gtest/gtest-death-test.h
32 changes: 17 additions & 15 deletions deps/googletest/include/gtest/internal/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
// GTEST_HAS_POSIX_RE (see above) which users can
// define themselves.
// GTEST_USES_SIMPLE_RE - our own simple regex is used;
// GTEST_USES_STD_RE - std::regex from the C++ standard library is used;
// the above RE\b(s) are mutually exclusive.
// GTEST_HAS_ABSL - Google Test is compiled with Abseil.

Expand Down Expand Up @@ -438,8 +438,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#include <regex.h> // NOLINT
#define GTEST_USES_POSIX_RE 1
#else
// Use our own simple regex implementation.
#define GTEST_USES_SIMPLE_RE 1
// Use std::regex from the C++ standard library.
#include <regex> // NOLINT
#define GTEST_USES_STD_RE 1
#endif

#ifndef GTEST_HAS_EXCEPTIONS
Expand Down Expand Up @@ -992,12 +993,11 @@ class GTEST_API_ [[nodiscard]] RE {
RE2 regex_;
};

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

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

#else // GTEST_USES_SIMPLE_RE
#else // GTEST_USES_STD_RE

std::string full_pattern_; // For FullMatch();
std::regex regex_;

#endif
};
Expand Down Expand Up @@ -1755,14 +1755,16 @@ class [[nodiscard]] MutexBase {
#define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
extern ::testing::internal::MutexBase mutex

#if defined(PTHREAD_NULL)
#define GTEST_INTERNAL_PTHREAD_NULL PTHREAD_NULL
#else
#define GTEST_INTERNAL_PTHREAD_NULL (pthread_t{})
#endif

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

// The Mutex class can only be used for mutexes created at runtime. It
// shares its API with MutexBase otherwise.
Expand Down
21 changes: 1 addition & 20 deletions deps/googletest/src/gtest-internal-inl.h
Loading
Loading