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 a99ba55

Browse filesBrowse files
nodejs-github-botmarco-ippolito
authored andcommitted
deps: update googletest to 50b8600
PR-URL: #59955 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 6349a79 commit a99ba55
Copy full SHA for a99ba55

2 files changed

+19-12Lines changed: 19 additions & 12 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
+17-10Lines 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-
void Lock();
1388+
void lock();
13891389

1390-
void Unlock();
1390+
void unlock();
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-
explicit GTestMutexLock(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); }
1427+
explicit GTestMutexLock(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
class MutexBase {
16421642
public:
16431643
// Acquires this mutex.
1644-
void Lock() {
1644+
void lock() {
16451645
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
16461646
owner_ = pthread_self();
16471647
has_owner_ = true;
16481648
}
16491649

16501650
// Releases this mutex.
1651-
void Unlock() {
1651+
void unlock() {
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
class GTestMutexLock {
17181718
public:
1719-
explicit GTestMutexLock(MutexBase* mutex) : mutex_(mutex) { mutex_->Lock(); }
1719+
explicit GTestMutexLock(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
class Mutex {
18651865
public:
18661866
Mutex() {}
1867-
void Lock() {}
1868-
void Unlock() {}
1867+
void lock() {}
1868+
void unlock() {}
18691869
void AssertHeld() 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+
#define GTEST_INTERNAL_DEPRECATE_AND_INLINE(msg) \
2327+
[[deprecated(msg), clang::annotate("inline-me")]]
2328+
#else
2329+
#define GTEST_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
#define GTEST_INTERNAL_HAS_STD_SPAN 1
Collapse file

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

Copy file name to clipboardExpand all lines: deps/googletest/src/gtest-port.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ Mutex::~Mutex() {
320320
}
321321
}
322322

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

329-
void Mutex::Unlock() {
329+
void Mutex::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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.