Skip to content

Commit 05e560d

Browse files
nodejs-github-bottargos
authored andcommitted
deps: update googletest to 50b8600
PR-URL: #59955 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 6695067 commit 05e560d

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

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

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,9 +1385,9 @@ class GTEST_API_ Mutex{
13851385
Mutex();
13861386
~Mutex();
13871387

1388-
voidLock();
1388+
voidlock();
13891389

1390-
voidUnlock();
1390+
voidunlock();
13911391

13921392
// Does nothing if the current thread holds the mutex. Otherwise, crashes
13931393
// with high probability.
@@ -1424,9 +1424,9 @@ class GTEST_API_ Mutex{
14241424
// "MutexLock l(&mu)". Hence the typedef trick below.
14251425
class GTestMutexLock{
14261426
public:
1427-
explicitGTestMutexLock(Mutex* mutex) : mutex_(mutex){mutex_->Lock()}
1427+
explicitGTestMutexLock(Mutex* mutex) : mutex_(mutex){mutex_->lock()}
14281428

1429-
~GTestMutexLock(){mutex_->Unlock()}
1429+
~GTestMutexLock(){mutex_->unlock()}
14301430

14311431
private:
14321432
Mutex* const mutex_;
@@ -1641,14 +1641,14 @@ class ThreadLocal : public ThreadLocalBase{
16411641
classMutexBase{
16421642
public:
16431643
// Acquires this mutex.
1644-
voidLock(){
1644+
voidlock(){
16451645
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
16461646
owner_ = pthread_self();
16471647
has_owner_ = true;
16481648
}
16491649

16501650
// Releases this mutex.
1651-
voidUnlock(){
1651+
voidunlock(){
16521652
// Since the lock is being released the owner_ field should no longer be
16531653
// considered valid. We don't protect writing to has_owner_ here, as it's
16541654
// the caller's responsibility to ensure that the current thread holds the
@@ -1716,9 +1716,9 @@ class Mutex : public MutexBase{
17161716
// "MutexLock l(&mu)". Hence the typedef trick below.
17171717
classGTestMutexLock{
17181718
public:
1719-
explicitGTestMutexLock(MutexBase* mutex) : mutex_(mutex){mutex_->Lock()}
1719+
explicitGTestMutexLock(MutexBase* mutex) : mutex_(mutex){mutex_->lock()}
17201720

1721-
~GTestMutexLock(){mutex_->Unlock()}
1721+
~GTestMutexLock(){mutex_->unlock()}
17221722

17231723
private:
17241724
MutexBase* const mutex_;
@@ -1864,8 +1864,8 @@ class GTEST_API_ ThreadLocal{
18641864
classMutex{
18651865
public:
18661866
Mutex(){}
1867-
voidLock(){}
1868-
voidUnlock(){}
1867+
voidlock(){}
1868+
voidunlock(){}
18691869
voidAssertHeld() const{}
18701870
};
18711871

@@ -2322,6 +2322,13 @@ const char* StringFromGTestEnv(const char* flag, const char* default_val);
23222322
} // namespace internal
23232323
} // namespace testing
23242324

2325+
#if GTEST_INTERNAL_HAVE_CPP_ATTRIBUTE(clang::annotate)
2326+
#defineGTEST_INTERNAL_DEPRECATE_AND_INLINE(msg) \
2327+
[[deprecated(msg), clang::annotate("inline-me")]]
2328+
#else
2329+
#defineGTEST_INTERNAL_DEPRECATE_AND_INLINE(msg) [[deprecated(msg)]]
2330+
#endif
2331+
23252332
#if defined(__cpp_lib_span) || (GTEST_INTERNAL_HAS_INCLUDE(<span>) && \
23262333
GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L)
23272334
#defineGTEST_INTERNAL_HAS_STD_SPAN1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ Mutex::~Mutex(){
320320
}
321321
}
322322

323-
voidMutex::Lock(){
323+
voidMutex::lock(){
324324
ThreadSafeLazyInit();
325325
::EnterCriticalSection(critical_section_);
326326
owner_thread_id_ = ::GetCurrentThreadId();
327327
}
328328

329-
voidMutex::Unlock(){
329+
voidMutex::unlock(){
330330
ThreadSafeLazyInit();
331331
// We don't protect writing to owner_thread_id_ here, as it's the
332332
// caller's responsibility to ensure that the current thread holds the

0 commit comments

Comments
(0)