43 #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
44 #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
268 #include <type_traits>
271 # include <sys/types.h>
272 # include <sys/stat.h>
275 #if defined __APPLE__
276 # include <AvailabilityMacros.h>
277 # include <TargetConditionals.h>
287 #include "gtest/internal/custom/gtest-port.h"
288 #include "gtest/internal/gtest-port-arch.h"
290 #if !defined(GTEST_DEV_EMAIL_)
291 # define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
292 # define GTEST_FLAG_PREFIX_ "gtest_"
293 # define GTEST_FLAG_PREFIX_DASH_ "gtest-"
294 # define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
295 # define GTEST_NAME_ "Google Test"
296 # define GTEST_PROJECT_URL_ "https://github.com/google/googletest/"
299 #if !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
300 # define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest"
306 # define GTEST_GCC_VER_ \
307 (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
315 #if defined(_MSC_VER)
316 # define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \
317 __pragma(warning(push)) \
318 __pragma(warning(disable: warnings))
319 # define GTEST_DISABLE_MSC_WARNINGS_POP_() \
320 __pragma(warning(pop))
323 # define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
324 # define GTEST_DISABLE_MSC_WARNINGS_POP_()
330 # define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
331 _Pragma("clang diagnostic push") \
332 _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
333 _Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"")
334 #define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
335 _Pragma("clang diagnostic pop")
337 # define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
338 GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
339 # define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
340 GTEST_DISABLE_MSC_WARNINGS_POP_()
347 # if !GTEST_OS_WINDOWS_MOBILE
352 #if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
355 typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
360 typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
367 # include <strings.h>
370 #if GTEST_OS_LINUX_ANDROID
372 # include <android/api-level.h>
377 #ifndef GTEST_HAS_POSIX_RE
378 # if GTEST_OS_LINUX_ANDROID
380 # define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)
382 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
389 #elif GTEST_HAS_POSIX_RE
397 # define GTEST_USES_POSIX_RE 1
399 #elif GTEST_OS_WINDOWS
403 # define GTEST_USES_SIMPLE_RE 1
409 # define GTEST_USES_SIMPLE_RE 1
413 #ifndef GTEST_HAS_EXCEPTIONS
416 # if defined(_MSC_VER) && defined(_CPPUNWIND)
418 # define GTEST_HAS_EXCEPTIONS 1
419 # elif defined(__BORLANDC__)
423 # ifndef _HAS_EXCEPTIONS
424 # define _HAS_EXCEPTIONS 1
426 # define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
427 # elif defined(__clang__)
436 # define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions))
437 # elif defined(__GNUC__) && __EXCEPTIONS
439 # define GTEST_HAS_EXCEPTIONS 1
440 # elif defined(__SUNPRO_CC)
444 # define GTEST_HAS_EXCEPTIONS 1
445 # elif defined(__IBMCPP__) && __EXCEPTIONS
447 # define GTEST_HAS_EXCEPTIONS 1
448 # elif defined(__HP_aCC)
451 # define GTEST_HAS_EXCEPTIONS 1
455 # define GTEST_HAS_EXCEPTIONS 0
459 #ifndef GTEST_HAS_STD_WSTRING
465 #define GTEST_HAS_STD_WSTRING \
466 (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
467 GTEST_OS_HAIKU || GTEST_OS_ESP32 || GTEST_OS_ESP8266))
472 #ifndef GTEST_HAS_RTTI
479 # define GTEST_HAS_RTTI 1
481 # define GTEST_HAS_RTTI 0
486 # elif defined(__GNUC__)
493 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \
494 !defined(__EXCEPTIONS)
495 # define GTEST_HAS_RTTI 0
497 # define GTEST_HAS_RTTI 1
500 # define GTEST_HAS_RTTI 0
506 # elif defined(__clang__)
508 # define GTEST_HAS_RTTI __has_feature(cxx_rtti)
512 # elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
515 # define GTEST_HAS_RTTI 1
517 # define GTEST_HAS_RTTI 0
523 # define GTEST_HAS_RTTI 1
536 #ifndef GTEST_HAS_PTHREAD
542 #define GTEST_HAS_PTHREAD \
543 (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX || \
544 GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \
545 GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_OPENBSD || \
549 #if GTEST_HAS_PTHREAD
552 # include <pthread.h>
562 #ifndef GTEST_HAS_CLONE
565 # if GTEST_OS_LINUX && !defined(__ia64__)
566 # if GTEST_OS_LINUX_ANDROID
569 # if defined(__LP64__) || \
570 (defined(__arm__) && __ANDROID_API__ >= 9) || \
571 (defined(__mips__) && __ANDROID_API__ >= 12) || \
572 (defined(__i386__) && __ANDROID_API__ >= 17)
573 # define GTEST_HAS_CLONE 1
575 # define GTEST_HAS_CLONE 0
578 # define GTEST_HAS_CLONE 1
581 # define GTEST_HAS_CLONE 0
588 #ifndef GTEST_HAS_STREAM_REDIRECTION
591 #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \
592 GTEST_OS_WINDOWS_RT || GTEST_OS_ESP8266
593 # define GTEST_HAS_STREAM_REDIRECTION 0
595 # define GTEST_HAS_STREAM_REDIRECTION 1
601 #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
602 (GTEST_OS_MAC && !GTEST_OS_IOS) || \
603 (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) || GTEST_OS_WINDOWS_MINGW || \
604 GTEST_OS_AIX || GTEST_OS_HPUX || GTEST_OS_OPENBSD || GTEST_OS_QNX || \
605 GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \
606 GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_HAIKU)
607 # define GTEST_HAS_DEATH_TEST 1
614 #if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \
615 defined(__IBMCPP__) || defined(__HP_aCC)
616 # define GTEST_HAS_TYPED_TEST 1
617 # define GTEST_HAS_TYPED_TEST_P 1
621 #define GTEST_WIDE_STRING_USES_UTF16_ \
622 (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2)
625 #if GTEST_OS_LINUX || GTEST_OS_GNU_KFREEBSD || GTEST_OS_DRAGONFLY || \
626 GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_OPENBSD
627 # define GTEST_CAN_STREAM_RESULTS_ 1
640 #ifdef __INTEL_COMPILER
641 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_
643 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default:
657 #if defined(__GNUC__) && !defined(COMPILER_ICC)
658 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
659 #elif defined(__clang__)
660 # if __has_attribute(unused)
661 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
664 #ifndef GTEST_ATTRIBUTE_UNUSED_
665 # define GTEST_ATTRIBUTE_UNUSED_
669 #if (defined(__GNUC__) || defined(__clang__)) && !defined(COMPILER_ICC)
670 # if defined(__MINGW_PRINTF_FORMAT)
674 # define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
675 __attribute__((__format__(__MINGW_PRINTF_FORMAT, string_index, \
678 # define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
679 __attribute__((__format__(__printf__, string_index, first_to_check)))
682 # define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)
688 #define GTEST_DISALLOW_ASSIGN_(type) \
689 type& operator=(type const &) = delete
693 #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
694 type(type const&) = delete; \
695 type& operator=(type const&) = delete
699 #define GTEST_DISALLOW_MOVE_ASSIGN_(type) \
700 type& operator=(type &&) noexcept = delete
704 #define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \
705 type(type&&) noexcept = delete; \
706 type& operator=(type&&) noexcept = delete
713 #if defined(__GNUC__) && !defined(COMPILER_ICC)
714 # define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
716 # define GTEST_MUST_USE_RESULT_
727 # define GTEST_INTENTIONAL_CONST_COND_PUSH_() \
728 GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127)
729 # define GTEST_INTENTIONAL_CONST_COND_POP_() \
730 GTEST_DISABLE_MSC_WARNINGS_POP_()
735 #ifndef GTEST_HAS_SEH
738 # if defined(_MSC_VER) || defined(__BORLANDC__)
740 # define GTEST_HAS_SEH 1
743 # define GTEST_HAS_SEH 0
748 #ifndef GTEST_IS_THREADSAFE
750 #define GTEST_IS_THREADSAFE \
751 (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ || \
752 (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \
763 # if GTEST_LINKED_AS_SHARED_LIBRARY
764 # define GTEST_API_ __declspec(dllimport)
765 # elif GTEST_CREATE_SHARED_LIBRARY
766 # define GTEST_API_ __declspec(dllexport)
768 #elif __GNUC__ >= 4 || defined(__clang__)
769 # define GTEST_API_ __attribute__((visibility ("default")))
778 #ifndef GTEST_DEFAULT_DEATH_TEST_STYLE
779 # define GTEST_DEFAULT_DEATH_TEST_STYLE "fast"
784 # define GTEST_NO_INLINE_ __attribute__((noinline))
786 # define GTEST_NO_INLINE_
790 #if !defined(GTEST_HAS_CXXABI_H_)
791 # if defined(__GLIBCXX__) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER))
792 # define GTEST_HAS_CXXABI_H_ 1
794 # define GTEST_HAS_CXXABI_H_ 0
800 #if defined(__clang__)
801 # if __has_feature(memory_sanitizer)
802 # define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ \
803 __attribute__((no_sanitize_memory))
805 # define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
808 # define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
812 #if defined(__clang__)
813 # if __has_feature(address_sanitizer)
814 # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ \
815 __attribute__((no_sanitize_address))
817 # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
820 # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
824 #if defined(__clang__)
825 # if __has_feature(hwaddress_sanitizer)
826 # define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ \
827 __attribute__((no_sanitize("hwaddress")))
829 # define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
832 # define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
836 #if defined(__clang__)
837 # if __has_feature(thread_sanitizer)
838 # define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ \
839 __attribute__((no_sanitize_thread))
841 # define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
844 # define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
854 using std::make_tuple;
856 using std::tuple_element;
857 using std::tuple_size;
875 #define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg)
885 #elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE
896 RE(const ::std::string& regex) { Init(regex.c_str()); }
898 RE(
const char* regex) { Init(regex); }
902 const char*
pattern()
const {
return pattern_; }
909 return FullMatch(str.c_str(), re);
912 return PartialMatch(str.c_str(), re);
919 void Init(
const char* regex);
920 const char* pattern_;
923 # if GTEST_USES_POSIX_RE
926 regex_t partial_regex_;
930 const char* full_pattern_;
978 #if !defined(GTEST_LOG_)
980 # define GTEST_LOG_(severity) \
981 ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
982 __FILE__, __LINE__).GetStream()
989 #if !defined(GTEST_CHECK_)
1004 # define GTEST_CHECK_(condition) \
1005 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1006 if (::testing::internal::IsTrue(condition)) \
1009 GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
1017 #define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
1018 if (const int gtest_error = (posix_call)) \
1019 GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
1033 template <
typename T>
1035 template <
typename T>
1039 #define GTEST_REFERENCE_TO_CONST_(T) \
1040 typename ::testing::internal::ConstRef<T>::type
1062 template<
typename To>
1086 template<
typename To,
typename From>
1095 const To to =
nullptr;
1096 ::testing::internal::ImplicitCast_<From*>(to);
1101 GTEST_CHECK_(f ==
nullptr ||
dynamic_cast<To
>(f) !=
nullptr);
1103 return static_cast<To
>(f);
1111 template <
class Derived,
class Base>
1117 #if GTEST_HAS_DOWNCAST_
1118 return ::down_cast<Derived*>(base);
1119 #elif GTEST_HAS_RTTI
1120 return dynamic_cast<Derived*
>(base);
1122 return static_cast<Derived*
>(base);
1126 #if GTEST_HAS_STREAM_REDIRECTION
1149 #if GTEST_HAS_DEATH_TEST
1151 std::vector<std::string> GetInjectableArgvs();
1153 void SetInjectableArgvs(
const std::vector<std::string>* new_argvs);
1154 void SetInjectableArgvs(
const std::vector<std::string>& new_argvs);
1155 void ClearInjectableArgvs();
1160 #if GTEST_IS_THREADSAFE
1161 # if GTEST_HAS_PTHREAD
1165 inline void SleepMilliseconds(
int n) {
1166 const timespec time = {
1170 nanosleep(&time,
nullptr);
1174 # if GTEST_HAS_NOTIFICATION_
1178 # elif GTEST_HAS_PTHREAD
1185 class Notification {
1187 Notification() : notified_(false) {
1191 pthread_mutex_destroy(&mutex_);
1197 pthread_mutex_lock(&mutex_);
1199 pthread_mutex_unlock(&mutex_);
1204 void WaitForNotification() {
1206 pthread_mutex_lock(&mutex_);
1207 const bool notified = notified_;
1208 pthread_mutex_unlock(&mutex_);
1211 SleepMilliseconds(10);
1216 pthread_mutex_t mutex_;
1222 # elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
1235 typedef void* Handle;
1237 explicit AutoHandle(Handle handle);
1243 void Reset(Handle handle);
1248 bool IsCloseable()
const;
1265 void WaitForNotification();
1277 # if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
1284 class ThreadWithParamBase {
1286 virtual ~ThreadWithParamBase() {}
1287 virtual void Run() = 0;
1296 extern "C" inline void* ThreadFuncWithCLinkage(
void* thread) {
1297 static_cast<ThreadWithParamBase*
>(thread)->Run();
1313 template <
typename T>
1314 class ThreadWithParam :
public ThreadWithParamBase {
1316 typedef void UserThreadFunc(T);
1318 ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
1321 thread_can_start_(thread_can_start),
1323 ThreadWithParamBase*
const base =
this;
1327 pthread_create(&thread_,
nullptr, &ThreadFuncWithCLinkage, base));
1329 ~ThreadWithParam()
override { Join(); }
1338 void Run()
override {
1339 if (thread_can_start_ !=
nullptr) thread_can_start_->WaitForNotification();
1344 UserThreadFunc*
const func_;
1348 Notification*
const thread_can_start_;
1358 # if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
1362 # elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
1380 enum MutexType { kStatic = 0, kDynamic = 1 };
1384 enum StaticConstructorSelector { kStaticMutex = 0 };
1389 explicit Mutex(StaticConstructorSelector ) {}
1404 void ThreadSafeLazyInit();
1408 unsigned int owner_thread_id_;
1413 long critical_section_init_phase_;
1414 GTEST_CRITICAL_SECTION* critical_section_;
1419 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
1420 extern ::testing::internal::Mutex mutex
1422 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
1423 ::testing::internal::Mutex mutex(::testing::internal::Mutex::kStaticMutex)
1430 class GTestMutexLock {
1433 : mutex_(mutex) { mutex_->Lock(); }
1438 Mutex*
const mutex_;
1447 class ThreadLocalValueHolderBase {
1449 virtual ~ThreadLocalValueHolderBase() {}
1454 class ThreadLocalBase {
1460 virtual ThreadLocalValueHolderBase* NewValueForCurrentThread()
const = 0;
1463 ThreadLocalBase() {}
1464 virtual ~ThreadLocalBase() {}
1477 static ThreadLocalValueHolderBase* GetValueOnCurrentThread(
1478 const ThreadLocalBase* thread_local_instance);
1481 static void OnThreadLocalDestroyed(
1482 const ThreadLocalBase* thread_local_instance);
1492 virtual ~Runnable() {}
1493 virtual void Run() = 0;
1496 ThreadWithParamBase(Runnable *runnable, Notification* thread_can_start);
1497 virtual ~ThreadWithParamBase();
1504 template <
typename T>
1505 class ThreadWithParam :
public ThreadWithParamBase {
1507 typedef void UserThreadFunc(T);
1509 ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
1510 : ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {
1512 virtual ~ThreadWithParam() {}
1515 class RunnableImpl :
public Runnable {
1517 RunnableImpl(UserThreadFunc* func, T param)
1521 virtual ~RunnableImpl() {}
1522 virtual void Run() {
1527 UserThreadFunc*
const func_;
1563 template <
typename T>
1564 class ThreadLocal :
public ThreadLocalBase {
1566 ThreadLocal() : default_factory_(new DefaultValueHolderFactory()) {}
1568 : default_factory_(new InstanceValueHolderFactory(value)) {}
1570 ~
ThreadLocal() { ThreadLocalRegistry::OnThreadLocalDestroyed(
this); }
1572 T*
pointer() {
return GetOrCreateValue(); }
1573 const T*
pointer()
const {
return GetOrCreateValue(); }
1575 void set(
const T& value) { *
pointer() = value; }
1580 class ValueHolder :
public ThreadLocalValueHolderBase {
1582 ValueHolder() : value_() {}
1583 explicit ValueHolder(
const T& value) : value_(value) {}
1585 T*
pointer() {
return &value_; }
1593 T* GetOrCreateValue()
const {
1594 return static_cast<ValueHolder*
>(
1595 ThreadLocalRegistry::GetValueOnCurrentThread(
this))->
pointer();
1598 virtual ThreadLocalValueHolderBase* NewValueForCurrentThread()
const {
1599 return default_factory_->MakeNewHolder();
1602 class ValueHolderFactory {
1604 ValueHolderFactory() {}
1605 virtual ~ValueHolderFactory() {}
1606 virtual ValueHolder* MakeNewHolder()
const = 0;
1612 class DefaultValueHolderFactory :
public ValueHolderFactory {
1614 DefaultValueHolderFactory() {}
1615 ValueHolder* MakeNewHolder()
const override {
return new ValueHolder(); }
1621 class InstanceValueHolderFactory :
public ValueHolderFactory {
1623 explicit InstanceValueHolderFactory(
const T& value) : value_(value) {}
1624 ValueHolder* MakeNewHolder()
const override {
1625 return new ValueHolder(value_);
1634 std::unique_ptr<ValueHolderFactory> default_factory_;
1639 # elif GTEST_HAS_PTHREAD
1647 owner_ = pthread_self();
1663 void AssertHeld()
const {
1664 GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
1665 <<
"The current thread is not holding the mutex @" <<
this;
1674 pthread_mutex_t mutex_;
1686 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
1687 extern ::testing::internal::MutexBase mutex
1695 #define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
1696 ::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0}
1700 class Mutex :
public MutexBase {
1719 class GTestMutexLock {
1722 : mutex_(mutex) { mutex_->Lock(); }
1727 MutexBase*
const mutex_;
1740 class ThreadLocalValueHolderBase {
1742 virtual ~ThreadLocalValueHolderBase() {}
1747 extern "C" inline void DeleteThreadLocalValue(
void* value_holder) {
1748 delete static_cast<ThreadLocalValueHolderBase*
>(value_holder);
1752 template <
typename T>
1756 : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}
1757 explicit ThreadLocal(
const T& value)
1758 : key_(CreateKey()),
1759 default_factory_(new InstanceValueHolderFactory(value)) {}
1763 DeleteThreadLocalValue(pthread_getspecific(key_));
1770 T* pointer() {
return GetOrCreateValue(); }
1771 const T* pointer()
const {
return GetOrCreateValue(); }
1772 const T& get()
const {
return *pointer(); }
1773 void set(
const T& value) { *pointer() = value; }
1777 class ValueHolder :
public ThreadLocalValueHolderBase {
1779 ValueHolder() : value_() {}
1780 explicit ValueHolder(
const T& value) : value_(value) {}
1782 T* pointer() {
return &value_; }
1789 static pthread_key_t CreateKey() {
1794 pthread_key_create(&key, &DeleteThreadLocalValue));
1798 T* GetOrCreateValue()
const {
1799 ThreadLocalValueHolderBase*
const holder =
1800 static_cast<ThreadLocalValueHolderBase*
>(pthread_getspecific(key_));
1801 if (holder !=
nullptr) {
1802 return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
1805 ValueHolder*
const new_holder = default_factory_->MakeNewHolder();
1806 ThreadLocalValueHolderBase*
const holder_base = new_holder;
1808 return new_holder->pointer();
1811 class ValueHolderFactory {
1813 ValueHolderFactory() {}
1814 virtual ~ValueHolderFactory() {}
1815 virtual ValueHolder* MakeNewHolder()
const = 0;
1821 class DefaultValueHolderFactory :
public ValueHolderFactory {
1823 DefaultValueHolderFactory() {}
1824 ValueHolder* MakeNewHolder()
const override {
return new ValueHolder(); }
1830 class InstanceValueHolderFactory :
public ValueHolderFactory {
1832 explicit InstanceValueHolderFactory(
const T& value) : value_(value) {}
1833 ValueHolder* MakeNewHolder()
const override {
1834 return new ValueHolder(value_);
1844 const pthread_key_t key_;
1845 std::unique_ptr<ValueHolderFactory> default_factory_;
1867 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
1868 extern ::testing::internal::Mutex mutex
1870 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
1884 template <
typename T>
1891 const T&
get()
const {
return value_; }
1892 void set(
const T& value) { value_ = value; }
1903 #if GTEST_OS_WINDOWS
1904 # define GTEST_PATH_SEP_ "\\"
1905 # define GTEST_HAS_ALT_PATH_SEP_ 1
1907 # define GTEST_PATH_SEP_ "/"
1908 # define GTEST_HAS_ALT_PATH_SEP_ 0
1919 return isalpha(
static_cast<unsigned char>(ch)) != 0;
1922 return isalnum(
static_cast<unsigned char>(ch)) != 0;
1925 return isdigit(
static_cast<unsigned char>(ch)) != 0;
1928 return islower(
static_cast<unsigned char>(ch)) != 0;
1931 return isspace(
static_cast<unsigned char>(ch)) != 0;
1934 return isupper(
static_cast<unsigned char>(ch)) != 0;
1937 return isxdigit(
static_cast<unsigned char>(ch)) != 0;
1940 const unsigned char low_byte =
static_cast<unsigned char>(ch);
1941 return ch == low_byte && isxdigit(low_byte) != 0;
1945 return static_cast<char>(tolower(
static_cast<unsigned char>(ch)));
1948 return static_cast<char>(toupper(
static_cast<unsigned char>(ch)));
1952 std::string::iterator it = str.end();
1953 while (it != str.begin() &&
IsSpace(*--it))
1968 #if GTEST_OS_WINDOWS
1972 # ifdef __BORLANDC__
1973 inline int DoIsATTY(
int fd) {
return isatty(fd); }
1974 inline int StrCaseCmp(
const char* s1,
const char* s2) {
1975 return stricmp(s1, s2);
1977 inline char*
StrDup(
const char* src) {
return strdup(src); }
1979 # if GTEST_OS_WINDOWS_MOBILE
1980 inline int DoIsATTY(
int ) {
return 0; }
1982 inline int DoIsATTY(
int fd) {
return _isatty(fd); }
1984 inline int StrCaseCmp(
const char* s1,
const char* s2) {
1985 return _stricmp(s1, s2);
1987 inline char*
StrDup(
const char* src) {
return _strdup(src); }
1990 # if GTEST_OS_WINDOWS_MOBILE
1991 inline int FileNo(FILE* file) {
return reinterpret_cast<int>(_fileno(file)); }
1995 inline int FileNo(FILE* file) {
return _fileno(file); }
1996 inline int Stat(
const char* path,
StatStruct* buf) {
return _stat(path, buf); }
1997 inline int RmDir(
const char* dir) {
return _rmdir(dir); }
1999 return (_S_IFDIR & st.st_mode) != 0;
2003 #elif GTEST_OS_ESP8266
2006 inline int FileNo(FILE* file) {
return fileno(file); }
2007 inline int DoIsATTY(
int fd) {
return isatty(fd); }
2012 inline int StrCaseCmp(
const char* s1,
const char* s2) {
2013 return strcasecmp(s1, s2);
2015 inline char*
StrDup(
const char* src) {
return strdup(src); }
2016 inline int RmDir(
const char* dir) {
return rmdir(dir); }
2017 inline bool IsDir(
const StatStruct& st) {
return S_ISDIR(st.st_mode); }
2023 inline int FileNo(FILE* file) {
return fileno(file); }
2027 return strcasecmp(s1, s2);
2029 inline char*
StrDup(
const char* src) {
return strdup(src); }
2030 inline int RmDir(
const char* dir) {
return rmdir(dir); }
2039 int savedErrno = errno;
2054 #if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
2055 inline int ChDir(
const char* dir) {
return chdir(dir); }
2057 inline FILE*
FOpen(
const char* path,
const char* mode) {
2058 #if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
2059 struct wchar_codecvt :
public std::codecvt<wchar_t, char, std::mbstate_t> {};
2060 std::wstring_convert<wchar_codecvt> converter;
2061 std::wstring wide_path = converter.from_bytes(path);
2062 std::wstring wide_mode = converter.from_bytes(mode);
2063 return _wfopen(wide_path.c_str(), wide_mode.c_str());
2065 return fopen(path, mode);
2068 #if !GTEST_OS_WINDOWS_MOBILE
2069 inline FILE *
FReopen(
const char* path,
const char* mode, FILE* stream) {
2070 return freopen(path, mode, stream);
2072 inline FILE*
FDOpen(
int fd,
const char* mode) {
return fdopen(fd, mode); }
2074 inline int FClose(FILE* fp) {
return fclose(fp); }
2075 #if !GTEST_OS_WINDOWS_MOBILE
2076 inline int Read(
int fd,
void* buf,
unsigned int count) {
2077 return static_cast<int>(read(fd, buf, count));
2079 inline int Write(
int fd,
const void* buf,
unsigned int count) {
2080 return static_cast<int>(write(fd, buf, count));
2082 inline int Close(
int fd) {
return close(fd); }
2083 inline const char*
StrError(
int errnum) {
return strerror(errnum); }
2085 inline const char*
GetEnv(
const char* name) {
2086 #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \
2087 GTEST_OS_WINDOWS_RT || GTEST_OS_ESP8266
2089 static_cast<void>(name);
2091 #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
2094 const char*
const env = getenv(name);
2095 return (env !=
nullptr && env[0] !=
'\0') ? env :
nullptr;
2097 return getenv(name);
2103 #if GTEST_OS_WINDOWS_MOBILE
2107 [[noreturn]]
void Abort();
2109 [[noreturn]]
inline void Abort() { abort(); }
2119 #if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE
2121 # define GTEST_SNPRINTF_(buffer, size, format, ...) \
2122 _snprintf_s(buffer, size, size, format, __VA_ARGS__)
2123 #elif defined(_MSC_VER)
2125 # define GTEST_SNPRINTF_ _snprintf
2127 # define GTEST_SNPRINTF_ snprintf
2156 template <
size_t size>
2186 #if !defined(GTEST_FLAG)
2187 # define GTEST_FLAG(name) FLAGS_gtest_##name
2190 #if !defined(GTEST_USE_OWN_FLAGFILE_FLAG_)
2191 # define GTEST_USE_OWN_FLAGFILE_FLAG_ 1
2194 #if !defined(GTEST_DECLARE_bool_)
2195 # define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver
2198 # define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
2199 # define GTEST_DECLARE_int32_(name) \
2200 GTEST_API_ extern std::int32_t GTEST_FLAG(name)
2201 # define GTEST_DECLARE_string_(name) \
2202 GTEST_API_ extern ::std::string GTEST_FLAG(name)
2205 # define GTEST_DEFINE_bool_(name, default_val, doc) \
2206 GTEST_API_ bool GTEST_FLAG(name) = (default_val)
2207 # define GTEST_DEFINE_int32_(name, default_val, doc) \
2208 GTEST_API_ std::int32_t GTEST_FLAG(name) = (default_val)
2209 # define GTEST_DEFINE_string_(name, default_val, doc) \
2210 GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
2215 #if !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)
2216 # define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
2217 # define GTEST_LOCK_EXCLUDED_(locks)
2236 #if !defined(GTEST_INTERNAL_DEPRECATED)
2246 #if defined(_MSC_VER)
2247 #define GTEST_INTERNAL_DEPRECATED(message) __declspec(deprecated(message))
2248 #elif defined(__GNUC__)
2249 #define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
2251 #define GTEST_INTERNAL_DEPRECATED(message)
2259 #define GTEST_INTERNAL_HAS_ANY 1
2260 #include "absl/types/any.h"
2262 namespace internal {
2263 using Any = ::absl::any;
2267 #ifdef __has_include
2268 #if __has_include(<any>) && __cplusplus >= 201703L
2271 #define GTEST_INTERNAL_HAS_ANY 1
2274 namespace internal {
2275 using Any = ::std::any;
2287 #define GTEST_INTERNAL_HAS_OPTIONAL 1
2288 #include "absl/types/optional.h"
2290 namespace internal {
2291 template <
typename T>
2292 using Optional = ::absl::optional<T>;
2296 #ifdef __has_include
2297 #if __has_include(<optional>) && __cplusplus >= 201703L
2300 #define GTEST_INTERNAL_HAS_OPTIONAL 1
2303 namespace internal {
2304 template <
typename T>
2305 using Optional = ::std::optional<T>;
2317 # define GTEST_INTERNAL_HAS_STRING_VIEW 1
2318 #include "absl/strings/string_view.h"
2320 namespace internal {
2321 using StringView = ::absl::string_view;
2325 # ifdef __has_include
2326 # if __has_include(<string_view>) && __cplusplus >= 201703L
2329 # define GTEST_INTERNAL_HAS_STRING_VIEW 1
2330 #include <string_view>
2332 namespace internal {
2333 using StringView = ::std::string_view;
2345 #define GTEST_INTERNAL_HAS_VARIANT 1
2346 #include "absl/types/variant.h"
2348 namespace internal {
2349 template <
typename... T>
2350 using Variant = ::absl::variant<T...>;
2354 #ifdef __has_include
2355 #if __has_include(<variant>) && __cplusplus >= 201703L
2358 #define GTEST_INTERNAL_HAS_VARIANT 1
2361 namespace internal {
2362 template <
typename... T>
2363 using Variant = ::std::variant<T...>;
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/gtest-message.h:91
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:963
GTestLog(GTestLogSeverity severity, const char *file, int line)
::std::ostream & GetStream()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:970
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1877
GTestMutexLock(Mutex *)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1879
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1859
void Unlock()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1863
Mutex()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1861
void Lock()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1862
void AssertHeld() const
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1864
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:889
static bool PartialMatch(const ::std::string &str, const RE &re)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:911
const char * pattern() const
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:902
static bool FullMatch(const char *str, const RE &re)
RE(const ::std::string ®ex)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:896
RE(const char *regex)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:898
static bool PartialMatch(const char *str, const RE &re)
static bool FullMatch(const ::std::string &str, const RE &re)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:908
RE(const RE &other)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:893
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1885
ThreadLocal()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1887
const T * pointer() const
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1890
ThreadLocal(const T &value)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1888
T * pointer()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1889
void set(const T &value)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1892
const T & get() const
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1891
std::uint32_t UInt
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2169
std::int32_t Int
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2168
std::int64_t Int
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2176
std::uint64_t UInt
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2177
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2157
void UInt
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2161
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1017
#define GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:337
#define GTEST_INTENTIONAL_CONST_COND_PUSH_()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:727
#define GTEST_DISABLE_MSC_DEPRECATED_POP_()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:339
#define GTEST_API_
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:775
#define GTEST_CHECK_(condition)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1004
#define GTEST_INTENTIONAL_CONST_COND_POP_()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:729
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:693
int DoIsATTY(int fd)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2024
int Close(int fd)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2082
int IsATTY(int fd)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2035
int ChDir(const char *dir)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2055
int StrCaseCmp(const char *s1, const char *s2)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2026
int Stat(const char *path, StatStruct *buf)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2025
int FileNo(FILE *file)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2023
int Read(int fd, void *buf, unsigned int count)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2076
char * StrDup(const char *src)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2029
void Abort()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2109
const char * StrError(int errnum)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2083
FILE * FReopen(const char *path, const char *mode, FILE *stream)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2069
FILE * FDOpen(int fd, const char *mode)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2072
struct stat StatStruct
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2021
const char * GetEnv(const char *name)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2085
int RmDir(const char *dir)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2030
bool IsDir(const StatStruct &st)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2031
int Write(int fd, const void *buf, unsigned int count)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2079
int FClose(FILE *fp)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2074
FILE * FOpen(const char *path, const char *mode)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2057
long long BiggestInt
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2133
void LogToStderr()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:984
GTestMutexLock MutexLock
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1882
std::string OutputFlagAlsoCheckEnvVar()
int64_t TimeInMillis
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2181
To DownCast_(From *f)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1087
GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char *file, int line)
void FlushInfoLog()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:985
GTEST_API_ ::std::string FormatFileLocation(const char *file, int line)
GTEST_API_ std::string GetCapturedStderr()
GTEST_API_ size_t GetFileSize(FILE *file)
bool IsDigit(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1924
bool BoolFromGTestEnv(const char *flag, bool default_val)
constexpr BiggestInt kMaxBiggestInt
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:2136
GTEST_API_ bool ParseInt32(const Message &src_text, const char *str, int32_t *value)
const char * StringFromGTestEnv(const char *flag, const char *default_val)
bool IsAlNum(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1921
bool IsUpper(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1933
GTEST_API_ size_t GetThreadCount()
GTEST_API_ void CaptureStderr()
To ImplicitCast_(To x)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1063
bool IsXDigit(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1936
GTestLogSeverity
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:953
@ GTEST_FATAL
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:957
@ GTEST_WARNING
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:955
@ GTEST_INFO
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:954
@ GTEST_ERROR
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:956
std::string StripTrailingSpaces(std::string str)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1951
GTEST_API_ std::vector< std::string > GetArgvs()
GTEST_API_ bool IsTrue(bool condition)
GTEST_API_ std::string ReadEntireFile(FILE *file)
char ToUpper(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1947
bool IsLower(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1927
GTEST_API_ void CaptureStdout()
char ToLower(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1944
bool IsAlpha(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1918
GTEST_API_ int32_t Int32FromGTestEnv(const char *flag, int32_t default_val)
GTEST_API_ std::string GetCapturedStdout()
bool IsSpace(char ch)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1930
Derived * CheckedDowncastToActualType(Base *base)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1112
Definition: cmake-build-debug/googletest-src/googlemock/include/gmock/gmock-actions.h:154
T & type
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1036
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1034
const T & type
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:1034