deps: update googletest to 56efe3983185e3f37e43415d1afa97e3860f187f

PR-URL: https://github.com/nodejs/node/pull/61605
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Node.js GitHub Bot authored and Antoine du Hamel committed 2026-02-08 10:09:00 +01:00
1 parent 300de2bb5a
commit e559ef6ab1
2 files changed
+29 -11

No files matched your search

+19 -1
View File
@@ -40,6 +40,7 @@
#define GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_
#include <atomic>
#include <cstddef>
#include <functional>
#include <memory>
#include <ostream>
@@ -485,6 +486,15 @@ class [[nodiscard]] Matcher : public internal::MatcherBase<T> {
// Implicit constructor here allows people to write
// EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes
Matcher(T value); // NOLINT
// Implicit constructor here allows people to write
// EXPECT_THAT(foo, nullptr) instead of EXPECT_THAT(foo, IsNull()) for smart
// pointer types.
//
// The second argument is needed to avoid capturing literal '0'.
template <typename U>
Matcher(U, // NOLINT
std::enable_if_t<std::is_same_v<U, std::nullptr_t>>* = nullptr);
};
// The following two specializations allow the user to write str
@@ -895,13 +905,21 @@ inline internal::EqMatcher<T> Eq(T x) {
return internal::EqMatcher<T>(x);
}
// Constructs a Matcher<T> from a 'value' of type T. The constructed
// Constructs a Matcher<T> from a 'value' of type T. The constructed
// matcher matches any value that's equal to 'value'.
template <typename T>
Matcher<T>::Matcher(T value) {
*this = Eq(value);
}
// Constructs a Matcher<T> from nullptr. The constructed matcher matches any
// value that is equal to nullptr.
template <typename T>
template <typename U>
Matcher<T>::Matcher(U, std::enable_if_t<std::is_same_v<U, std::nullptr_t>>*) {
*this = Eq(nullptr);
}
// Creates a monomorphic matcher that matches anything with type Lhs
// and equal to rhs. A user may need to use this instead of Eq(...)
// in order to resolve an overloading ambiguity.
+10 -10
View File
@@ -1452,7 +1452,7 @@ typedef GTestMutexLock MutexLock;
// without knowing its type.
class [[nodiscard]] ThreadLocalValueHolderBase {
public:
virtual ~ThreadLocalValueHolderBase() {}
virtual ~ThreadLocalValueHolderBase() = default;
};
// Provides a way for a thread to send notifications to a ThreadLocal
@@ -1466,8 +1466,8 @@ class [[nodiscard]] ThreadLocalBase {
virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const = 0;
protected:
ThreadLocalBase() {}
virtual ~ThreadLocalBase() {}
ThreadLocalBase() = default;
virtual ~ThreadLocalBase() = default;
private:
ThreadLocalBase(const ThreadLocalBase&) = delete;
@@ -1496,7 +1496,7 @@ class GTEST_API_ [[nodiscard]] ThreadWithParamBase {
protected:
class Runnable {
public:
virtual ~Runnable() {}
virtual ~Runnable() = default;
virtual void Run() = 0;
};
@@ -1515,14 +1515,14 @@ class [[nodiscard]] ThreadWithParam : public ThreadWithParamBase {
ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
: ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {}
virtual ~ThreadWithParam() {}
~ThreadWithParam() override {}
private:
class RunnableImpl : public Runnable {
public:
RunnableImpl(UserThreadFunc* func, T param) : func_(func), param_(param) {}
virtual ~RunnableImpl() {}
virtual void Run() { func_(param_); }
~RunnableImpl() override {}
void Run() override { func_(param_); }
private:
UserThreadFunc* const func_;
@@ -1605,8 +1605,8 @@ class [[nodiscard]] ThreadLocal : public ThreadLocalBase {
class ValueHolderFactory {
public:
ValueHolderFactory() {}
virtual ~ValueHolderFactory() {}
ValueHolderFactory() = default;
virtual ~ValueHolderFactory() = default;
virtual ValueHolder* MakeNewHolder() const = 0;
private:
@@ -1616,7 +1616,7 @@ class [[nodiscard]] ThreadLocal : public ThreadLocalBase {
class DefaultValueHolderFactory : public ValueHolderFactory {
public:
DefaultValueHolderFactory() {}
DefaultValueHolderFactory() = default;
ValueHolder* MakeNewHolder() const override { return new ValueHolder(); }
private: