43 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ 44 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ 265 # include <sys/types.h> 266 # include <sys/stat.h> 267 #endif // !_WIN32_WCE 269 #if defined __APPLE__ 270 # include <AvailabilityMacros.h> 271 # include <TargetConditionals.h> 284 #if !defined(GTEST_DEV_EMAIL_) 285 # define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com" 286 # define GTEST_FLAG_PREFIX_ "gtest_" 287 # define GTEST_FLAG_PREFIX_DASH_ "gtest-" 288 # define GTEST_FLAG_PREFIX_UPPER_ "GTEST_" 289 # define GTEST_NAME_ "Google Test" 290 # define GTEST_PROJECT_URL_ "https://github.com/google/googletest/" 291 #endif // !defined(GTEST_DEV_EMAIL_) 293 #if !defined(GTEST_INIT_GOOGLE_TEST_NAME_) 294 # define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest" 295 #endif // !defined(GTEST_INIT_GOOGLE_TEST_NAME_) 300 # define GTEST_GCC_VER_ \ 301 (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) 310 # define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \ 311 __pragma(warning(push)) \ 312 __pragma(warning(disable: warnings)) 313 # define GTEST_DISABLE_MSC_WARNINGS_POP_() \ 314 __pragma(warning(pop)) 317 # define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) 318 # define GTEST_DISABLE_MSC_WARNINGS_POP_() 321 #ifndef GTEST_LANG_CXX11 326 # if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L 328 # define GTEST_LANG_CXX11 1 330 # define GTEST_LANG_CXX11 0 343 #if GTEST_LANG_CXX11 && \ 344 (!defined(__GLIBCXX__) || ( \ 345 __GLIBCXX__ >= 20110325ul && \ 347 __GLIBCXX__ != 20110416ul && \ 348 __GLIBCXX__ != 20120313ul && \ 349 __GLIBCXX__ != 20110428ul && \ 350 __GLIBCXX__ != 20120702ul)) 351 # define GTEST_STDLIB_CXX11 1 355 #if GTEST_STDLIB_CXX11 356 # define GTEST_HAS_STD_BEGIN_AND_END_ 1 357 # define GTEST_HAS_STD_FORWARD_LIST_ 1 358 # define GTEST_HAS_STD_FUNCTION_ 1 359 # define GTEST_HAS_STD_INITIALIZER_LIST_ 1 360 # define GTEST_HAS_STD_MOVE_ 1 361 # define GTEST_HAS_STD_SHARED_PTR_ 1 362 # define GTEST_HAS_STD_TYPE_TRAITS_ 1 363 # define GTEST_HAS_STD_UNIQUE_PTR_ 1 369 # define GTEST_HAS_STD_TUPLE_ 1 370 # if defined(__clang__) 372 # if defined(__has_include) && !__has_include(<tuple>) 373 # undef GTEST_HAS_STD_TUPLE_ 375 # elif defined(_MSC_VER) 377 # if defined(_CPPLIB_VER) && _CPPLIB_VER < 520 378 # undef GTEST_HAS_STD_TUPLE_ 380 # elif defined(__GLIBCXX__) 384 # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2) 385 # undef GTEST_HAS_STD_TUPLE_ 394 # if !GTEST_OS_WINDOWS_MOBILE 402 struct _RTL_CRITICAL_SECTION;
408 # include <strings.h> 409 #endif // GTEST_OS_WINDOWS 411 #if GTEST_OS_LINUX_ANDROID 413 # include <android/api-level.h> 417 #ifndef GTEST_HAS_POSIX_RE 418 # if GTEST_OS_LINUX_ANDROID 420 # define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9) 422 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS) 429 #elif GTEST_HAS_POSIX_RE 437 # define GTEST_USES_POSIX_RE 1 439 #elif GTEST_OS_WINDOWS 443 # define GTEST_USES_SIMPLE_RE 1 449 # define GTEST_USES_SIMPLE_RE 1 451 #endif // GTEST_USES_PCRE 453 #ifndef GTEST_HAS_EXCEPTIONS 456 # if defined(_MSC_VER) || defined(__BORLANDC__) 460 # ifndef _HAS_EXCEPTIONS 461 # define _HAS_EXCEPTIONS 1 462 # endif // _HAS_EXCEPTIONS 463 # define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS 464 # elif defined(__clang__) 472 # define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions)) 473 # elif defined(__GNUC__) && __EXCEPTIONS 475 # define GTEST_HAS_EXCEPTIONS 1 476 # elif defined(__SUNPRO_CC) 480 # define GTEST_HAS_EXCEPTIONS 1 481 # elif defined(__IBMCPP__) && __EXCEPTIONS 483 # define GTEST_HAS_EXCEPTIONS 1 484 # elif defined(__HP_aCC) 487 # define GTEST_HAS_EXCEPTIONS 1 491 # define GTEST_HAS_EXCEPTIONS 0 492 # endif // defined(_MSC_VER) || defined(__BORLANDC__) 493 #endif // GTEST_HAS_EXCEPTIONS 495 #if !defined(GTEST_HAS_STD_STRING) 498 # define GTEST_HAS_STD_STRING 1 499 #elif !GTEST_HAS_STD_STRING 501 # error "Google Test cannot be used where ::std::string isn't available." 502 #endif // !defined(GTEST_HAS_STD_STRING) 504 #ifndef GTEST_HAS_GLOBAL_STRING 508 # define GTEST_HAS_GLOBAL_STRING 0 510 #endif // GTEST_HAS_GLOBAL_STRING 512 #ifndef GTEST_HAS_STD_WSTRING 521 # define GTEST_HAS_STD_WSTRING \ 522 (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS)) 524 #endif // GTEST_HAS_STD_WSTRING 526 #ifndef GTEST_HAS_GLOBAL_WSTRING 529 # define GTEST_HAS_GLOBAL_WSTRING \ 530 (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING) 531 #endif // GTEST_HAS_GLOBAL_WSTRING 534 #ifndef GTEST_HAS_RTTI 540 # ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. 541 # define GTEST_HAS_RTTI 1 543 # define GTEST_HAS_RTTI 0 547 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302) 554 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \ 555 !defined(__EXCEPTIONS) 556 # define GTEST_HAS_RTTI 0 558 # define GTEST_HAS_RTTI 1 559 # endif // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS 561 # define GTEST_HAS_RTTI 0 562 # endif // __GXX_RTTI 567 # elif defined(__clang__) 569 # define GTEST_HAS_RTTI __has_feature(cxx_rtti) 573 # elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) 576 # define GTEST_HAS_RTTI 1 578 # define GTEST_HAS_RTTI 0 584 # define GTEST_HAS_RTTI 1 588 #endif // GTEST_HAS_RTTI 597 #ifndef GTEST_HAS_PTHREAD 603 # define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \ 604 || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NACL) 605 #endif // GTEST_HAS_PTHREAD 607 #if GTEST_HAS_PTHREAD 610 # include <pthread.h> 618 #if !defined(GTEST_HAS_HASH_MAP_) 620 # define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available. 621 # define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available. 623 #endif // !defined(GTEST_HAS_HASH_MAP_) 628 #ifndef GTEST_HAS_TR1_TUPLE 629 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) 631 # define GTEST_HAS_TR1_TUPLE 0 634 # define GTEST_HAS_TR1_TUPLE 1 636 #endif // GTEST_HAS_TR1_TUPLE 640 #ifndef GTEST_USE_OWN_TR1_TUPLE 653 # if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \ 654 && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600 655 # define GTEST_ENV_HAS_TR1_TUPLE_ 1 661 # if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325) 662 # define GTEST_ENV_HAS_STD_TUPLE_ 1 665 # if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_ 666 # define GTEST_USE_OWN_TR1_TUPLE 0 668 # define GTEST_USE_OWN_TR1_TUPLE 1 671 #endif // GTEST_USE_OWN_TR1_TUPLE 676 #if GTEST_HAS_STD_TUPLE_ 678 # define GTEST_TUPLE_NAMESPACE_ ::std 679 #endif // GTEST_HAS_STD_TUPLE_ 683 #if GTEST_HAS_TR1_TUPLE 684 # ifndef GTEST_TUPLE_NAMESPACE_ 685 # define GTEST_TUPLE_NAMESPACE_ ::std::tr1 686 # endif // GTEST_TUPLE_NAMESPACE_ 688 # if GTEST_USE_OWN_TR1_TUPLE 690 # elif GTEST_ENV_HAS_STD_TUPLE_ 701 using ::std::tuple_element;
702 using ::std::tuple_size;
706 # elif GTEST_OS_SYMBIAN 713 # ifdef BOOST_HAS_TR1_TUPLE 714 # undef BOOST_HAS_TR1_TUPLE 715 # endif // BOOST_HAS_TR1_TUPLE 719 # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED 722 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) 726 # if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 732 # define _TR1_FUNCTIONAL 1 733 # include <tr1/tuple> 734 # undef _TR1_FUNCTIONAL // Allows the user to #include 737 # include <tr1/tuple> 738 # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 744 # endif // GTEST_USE_OWN_TR1_TUPLE 746 #endif // GTEST_HAS_TR1_TUPLE 752 #ifndef GTEST_HAS_CLONE 755 # if GTEST_OS_LINUX && !defined(__ia64__) 756 # if GTEST_OS_LINUX_ANDROID 758 # if defined(__arm__) && __ANDROID_API__ >= 9 759 # define GTEST_HAS_CLONE 1 761 # define GTEST_HAS_CLONE 0 764 # define GTEST_HAS_CLONE 1 767 # define GTEST_HAS_CLONE 0 768 # endif // GTEST_OS_LINUX && !defined(__ia64__) 770 #endif // GTEST_HAS_CLONE 774 #ifndef GTEST_HAS_STREAM_REDIRECTION 777 # if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || \ 778 GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT 779 # define GTEST_HAS_STREAM_REDIRECTION 0 781 # define GTEST_HAS_STREAM_REDIRECTION 1 782 # endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN 783 #endif // GTEST_HAS_STREAM_REDIRECTION 789 #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ 790 (GTEST_OS_MAC && !GTEST_OS_IOS) || \ 791 (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ 792 GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ 793 GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD) 794 # define GTEST_HAS_DEATH_TEST 1 800 #define GTEST_HAS_PARAM_TEST 1 806 #if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \ 807 defined(__IBMCPP__) || defined(__HP_aCC) 808 # define GTEST_HAS_TYPED_TEST 1 809 # define GTEST_HAS_TYPED_TEST_P 1 816 #if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC) 817 # define GTEST_HAS_COMBINE 1 821 #define GTEST_WIDE_STRING_USES_UTF16_ \ 822 (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX) 826 # define GTEST_CAN_STREAM_RESULTS_ 1 839 #ifdef __INTEL_COMPILER 840 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ 842 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT 856 #if defined(__GNUC__) && !defined(COMPILER_ICC) 857 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) 858 #elif defined(__clang__) 859 # if __has_attribute(unused) 860 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) 863 #ifndef GTEST_ATTRIBUTE_UNUSED_ 864 # define GTEST_ATTRIBUTE_UNUSED_ 869 #define GTEST_DISALLOW_ASSIGN_(type)\ 870 void operator=(type const &) 874 #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\ 876 GTEST_DISALLOW_ASSIGN_(type) 883 #if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC) 884 # define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result)) 886 # define GTEST_MUST_USE_RESULT_ 887 #endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC 897 # define GTEST_INTENTIONAL_CONST_COND_PUSH_() \ 898 GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127) 899 # define GTEST_INTENTIONAL_CONST_COND_POP_() \ 900 GTEST_DISABLE_MSC_WARNINGS_POP_() 905 #ifndef GTEST_HAS_SEH 908 # if defined(_MSC_VER) || defined(__BORLANDC__) 910 # define GTEST_HAS_SEH 1 913 # define GTEST_HAS_SEH 0 916 #define GTEST_IS_THREADSAFE \ 917 (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ \ 918 || (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) \ 919 || GTEST_HAS_PTHREAD) 921 #endif // GTEST_HAS_SEH 924 # if GTEST_LINKED_AS_SHARED_LIBRARY 925 # define GTEST_API_ __declspec(dllimport) 926 # elif GTEST_CREATE_SHARED_LIBRARY 927 # define GTEST_API_ __declspec(dllexport) 929 #elif __GNUC__ >= 4 || defined(__clang__) 930 # define GTEST_API_ __attribute__((visibility ("default"))) 939 # define GTEST_NO_INLINE_ __attribute__((noinline)) 941 # define GTEST_NO_INLINE_ 945 #if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION) 946 # define GTEST_HAS_CXXABI_H_ 1 948 # define GTEST_HAS_CXXABI_H_ 0 953 #if defined(__clang__) 954 # if __has_feature(memory_sanitizer) 955 # define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ \ 956 __attribute__((no_sanitize_memory)) 958 # define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ 959 # endif // __has_feature(memory_sanitizer) 961 # define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ 965 #if defined(__clang__) 966 # if __has_feature(address_sanitizer) 967 # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ \ 968 __attribute__((no_sanitize_address)) 970 # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ 971 # endif // __has_feature(address_sanitizer) 973 # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ 977 #if defined(__clang__) 978 # if __has_feature(thread_sanitizer) 979 # define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ \ 980 __attribute__((no_sanitize_thread)) 982 # define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ 983 # endif // __has_feature(thread_sanitizer) 985 # define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ 992 #if defined(GTEST_TUPLE_NAMESPACE_) 996 using GTEST_TUPLE_NAMESPACE_::get;
998 using GTEST_TUPLE_NAMESPACE_::tuple;
999 using GTEST_TUPLE_NAMESPACE_::tuple_size;
1000 using GTEST_TUPLE_NAMESPACE_::tuple_element;
1001 #endif // defined(GTEST_TUPLE_NAMESPACE_) 1003 namespace internal {
1025 #if GTEST_LANG_CXX11 1026 # define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg) 1027 #else // !GTEST_LANG_CXX11 1032 # define GTEST_COMPILE_ASSERT_(expr, msg) \ 1033 typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \ 1034 msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_ 1035 #endif // !GTEST_LANG_CXX11 1083 template <
typename T1,
typename T2>
1086 template <
typename T>
1088 enum { value =
true };
1092 #define GTEST_ARRAY_SIZE_(array) (sizeof(array) / sizeof(array[0])) 1094 #if GTEST_HAS_GLOBAL_STRING 1098 #endif // GTEST_HAS_GLOBAL_STRING 1100 #if GTEST_HAS_GLOBAL_WSTRING 1102 #elif GTEST_HAS_STD_WSTRING 1104 #endif // GTEST_HAS_GLOBAL_WSTRING 1114 template <
typename T>
1124 T*
get()
const {
return ptr_; }
1127 T*
const ptr = ptr_;
1134 if (
IsTrue(
sizeof(T) > 0)) {
1143 swap(a.ptr_, b.ptr_);
1165 #if GTEST_HAS_GLOBAL_STRING 1169 #endif // GTEST_HAS_GLOBAL_STRING 1171 RE(
const char* regex) { Init(regex); }
1185 return FullMatch(str.c_str(), re);
1188 return PartialMatch(str.c_str(), re);
1191 #if GTEST_HAS_GLOBAL_STRING 1194 return FullMatch(str.c_str(), re);
1197 return PartialMatch(str.c_str(), re);
1200 #endif // GTEST_HAS_GLOBAL_STRING 1202 static bool FullMatch(
const char* str,
const RE& re);
1203 static bool PartialMatch(
const char* str,
const RE& re);
1206 void Init(
const char* regex);
1211 const char* pattern_;
1214 #if GTEST_USES_POSIX_RE 1216 regex_t full_regex_;
1217 regex_t partial_regex_;
1219 #else // GTEST_USES_SIMPLE_RE 1221 const char* full_pattern_;
1269 #if !defined(GTEST_LOG_) 1271 # define GTEST_LOG_(severity) \ 1272 ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \ 1273 __FILE__, __LINE__).GetStream() 1278 #endif // !defined(GTEST_LOG_) 1280 #if !defined(GTEST_CHECK_) 1295 # define GTEST_CHECK_(condition) \ 1296 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 1297 if (::testing::internal::IsTrue(condition)) \ 1300 GTEST_LOG_(FATAL) << "Condition " #condition " failed. " 1301 #endif // !defined(GTEST_CHECK_) 1308 #define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \ 1309 if (const int gtest_error = (posix_call)) \ 1310 GTEST_LOG_(FATAL) << #posix_call << "failed with error " \ 1313 #if GTEST_HAS_STD_MOVE_ 1315 #else // GTEST_HAS_STD_MOVE_ 1316 template <
typename T>
1320 #endif // GTEST_HAS_STD_MOVE_ 1342 template<
typename To>
1366 template<
typename To,
typename From>
1376 ::testing::internal::ImplicitCast_<From*>(to);
1381 GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
1383 return static_cast<To>(f);
1391 template <
class Derived,
class Base>
1397 #if GTEST_HAS_DOWNCAST_ 1398 return ::down_cast<Derived*>(base);
1399 #elif GTEST_HAS_RTTI 1400 return dynamic_cast<Derived*
>(base);
1402 return static_cast<Derived*
>(base);
1406 #if GTEST_HAS_STREAM_REDIRECTION 1419 #endif // GTEST_HAS_STREAM_REDIRECTION 1433 #if GTEST_HAS_DEATH_TEST 1435 const ::std::vector<testing::internal::string>& GetInjectableArgvs();
1436 void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
1440 #endif // GTEST_HAS_DEATH_TEST 1443 #if GTEST_IS_THREADSAFE 1444 # if GTEST_HAS_PTHREAD 1448 inline void SleepMilliseconds(
int n) {
1449 const timespec time = {
1453 nanosleep(&time, NULL);
1455 # endif // GTEST_HAS_PTHREAD 1457 # if GTEST_HAS_NOTIFICATION_ 1461 # elif GTEST_HAS_PTHREAD 1468 class Notification {
1470 Notification() : notified_(
false) {
1474 pthread_mutex_destroy(&mutex_);
1480 pthread_mutex_lock(&mutex_);
1482 pthread_mutex_unlock(&mutex_);
1487 void WaitForNotification() {
1489 pthread_mutex_lock(&mutex_);
1490 const bool notified = notified_;
1491 pthread_mutex_unlock(&mutex_);
1494 SleepMilliseconds(10);
1499 pthread_mutex_t mutex_;
1505 # elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT 1518 typedef void* Handle;
1520 explicit AutoHandle(Handle handle);
1526 void Reset(Handle handle);
1530 bool IsCloseable()
const;
1547 void WaitForNotification();
1554 # endif // GTEST_HAS_NOTIFICATION_ 1559 # if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW 1566 class ThreadWithParamBase {
1568 virtual ~ThreadWithParamBase() {}
1569 virtual void Run() = 0;
1578 extern "C" inline void* ThreadFuncWithCLinkage(
void* thread) {
1579 static_cast<ThreadWithParamBase*
>(thread)->
Run();
1595 template <
typename T>
1596 class ThreadWithParam :
public ThreadWithParamBase {
1598 typedef void UserThreadFunc(T);
1600 ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
1603 thread_can_start_(thread_can_start),
1605 ThreadWithParamBase*
const base =
this;
1609 pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
1611 ~ThreadWithParam() { Join(); }
1620 virtual void Run() {
1621 if (thread_can_start_ != NULL)
1622 thread_can_start_->WaitForNotification();
1627 UserThreadFunc*
const func_;
1631 Notification*
const thread_can_start_;
1637 # endif // !GTEST_OS_WINDOWS && GTEST_HAS_PTHREAD || 1640 # if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ 1644 # elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT 1662 enum MutexType { kStatic = 0, kDynamic = 1 };
1666 enum StaticConstructorSelector { kStaticMutex = 0 };
1671 explicit Mutex(StaticConstructorSelector ) {}
1686 void ThreadSafeLazyInit();
1690 unsigned int owner_thread_id_;
1695 long critical_section_init_phase_;
1696 _RTL_CRITICAL_SECTION* critical_section_;
1701 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ 1702 extern ::testing::internal::Mutex mutex 1704 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ 1705 ::testing::internal::Mutex mutex(::testing::internal::Mutex::kStaticMutex) 1715 : mutex_(mutex) { mutex_->Lock(); }
1720 Mutex*
const mutex_;
1729 class ThreadLocalValueHolderBase {
1731 virtual ~ThreadLocalValueHolderBase() {}
1736 class ThreadLocalBase {
1742 virtual ThreadLocalValueHolderBase* NewValueForCurrentThread()
const = 0;
1745 ThreadLocalBase() {}
1746 virtual ~ThreadLocalBase() {}
1759 static ThreadLocalValueHolderBase* GetValueOnCurrentThread(
1760 const ThreadLocalBase* thread_local_instance);
1763 static void OnThreadLocalDestroyed(
1764 const ThreadLocalBase* thread_local_instance);
1774 virtual ~Runnable() {}
1775 virtual void Run() = 0;
1778 ThreadWithParamBase(Runnable *runnable, Notification* thread_can_start);
1779 virtual ~ThreadWithParamBase();
1786 template <
typename T>
1787 class ThreadWithParam :
public ThreadWithParamBase {
1789 typedef void UserThreadFunc(T);
1791 ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
1792 : ThreadWithParamBase(
new RunnableImpl(func, param), thread_can_start) {
1794 virtual ~ThreadWithParam() {}
1797 class RunnableImpl :
public Runnable {
1799 RunnableImpl(UserThreadFunc* func, T param)
1803 virtual ~RunnableImpl() {}
1804 virtual void Run() {
1809 UserThreadFunc*
const func_;
1845 template <
typename T>
1848 ThreadLocal() : default_factory_(
new DefaultValueHolderFactory()) {}
1850 : default_factory_(
new InstanceValueHolderFactory(value)) {}
1852 ~
ThreadLocal() { ThreadLocalRegistry::OnThreadLocalDestroyed(
this); }
1854 T* pointer() {
return GetOrCreateValue(); }
1855 const T* pointer()
const {
return GetOrCreateValue(); }
1856 const T&
get()
const {
return *pointer(); }
1857 void set(
const T& value) { *pointer() = value; }
1862 class ValueHolder :
public ThreadLocalValueHolderBase {
1864 ValueHolder() : value_() {}
1865 explicit ValueHolder(
const T& value) : value_(value) {}
1867 T* pointer() {
return &value_; }
1875 T* GetOrCreateValue()
const {
1876 return static_cast<ValueHolder*
>(
1877 ThreadLocalRegistry::GetValueOnCurrentThread(
this))->pointer();
1880 virtual ThreadLocalValueHolderBase* NewValueForCurrentThread()
const {
1881 return default_factory_->MakeNewHolder();
1884 class ValueHolderFactory {
1886 ValueHolderFactory() {}
1887 virtual ~ValueHolderFactory() {}
1888 virtual ValueHolder* MakeNewHolder()
const = 0;
1894 class DefaultValueHolderFactory :
public ValueHolderFactory {
1896 DefaultValueHolderFactory() {}
1897 virtual ValueHolder* MakeNewHolder()
const {
return new ValueHolder(); }
1903 class InstanceValueHolderFactory :
public ValueHolderFactory {
1905 explicit InstanceValueHolderFactory(
const T& value) : value_(value) {}
1906 virtual ValueHolder* MakeNewHolder()
const {
1907 return new ValueHolder(value_);
1921 # elif GTEST_HAS_PTHREAD 1929 owner_ = pthread_self();
1945 void AssertHeld()
const {
1946 GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
1947 <<
"The current thread is not holding the mutex @" <<
this;
1956 pthread_mutex_t mutex_;
1968 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ 1969 extern ::testing::internal::MutexBase mutex 1972 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ 1973 ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false, pthread_t() } 1977 class Mutex :
public MutexBase {
1999 : mutex_(mutex) { mutex_->Lock(); }
2004 MutexBase*
const mutex_;
2017 class ThreadLocalValueHolderBase {
2019 virtual ~ThreadLocalValueHolderBase() {}
2024 extern "C" inline void DeleteThreadLocalValue(
void* value_holder) {
2025 delete static_cast<ThreadLocalValueHolderBase*
>(value_holder);
2029 template <
typename T>
2033 : key_(CreateKey()), default_factory_(
new DefaultValueHolderFactory()) {}
2035 : key_(CreateKey()),
2036 default_factory_(
new InstanceValueHolderFactory(value)) {}
2040 DeleteThreadLocalValue(pthread_getspecific(key_));
2047 T* pointer() {
return GetOrCreateValue(); }
2048 const T* pointer()
const {
return GetOrCreateValue(); }
2049 const T&
get()
const {
return *pointer(); }
2050 void set(
const T& value) { *pointer() = value; }
2054 class ValueHolder :
public ThreadLocalValueHolderBase {
2056 ValueHolder() : value_() {}
2057 explicit ValueHolder(
const T& value) : value_(value) {}
2059 T* pointer() {
return &value_; }
2066 static pthread_key_t CreateKey() {
2071 pthread_key_create(&key, &DeleteThreadLocalValue));
2075 T* GetOrCreateValue()
const {
2076 ThreadLocalValueHolderBase*
const holder =
2077 static_cast<ThreadLocalValueHolderBase*
>(pthread_getspecific(key_));
2078 if (holder != NULL) {
2079 return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
2082 ValueHolder*
const new_holder = default_factory_->MakeNewHolder();
2083 ThreadLocalValueHolderBase*
const holder_base = new_holder;
2085 return new_holder->pointer();
2088 class ValueHolderFactory {
2090 ValueHolderFactory() {}
2091 virtual ~ValueHolderFactory() {}
2092 virtual ValueHolder* MakeNewHolder()
const = 0;
2098 class DefaultValueHolderFactory :
public ValueHolderFactory {
2100 DefaultValueHolderFactory() {}
2101 virtual ValueHolder* MakeNewHolder()
const {
return new ValueHolder(); }
2107 class InstanceValueHolderFactory :
public ValueHolderFactory {
2109 explicit InstanceValueHolderFactory(
const T& value) : value_(value) {}
2110 virtual ValueHolder* MakeNewHolder()
const {
2111 return new ValueHolder(value_);
2121 const pthread_key_t key_;
2127 # endif // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ 2129 #else // GTEST_IS_THREADSAFE 2144 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ 2145 extern ::testing::internal::Mutex mutex 2147 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex 2161 template <
typename T>
2168 const T&
get()
const {
return value_; }
2169 void set(
const T& value) { value_ = value; }
2174 #endif // GTEST_IS_THREADSAFE 2186 #if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) 2189 # define GTEST_ELLIPSIS_NEEDS_POD_ 1 2191 # define GTEST_CAN_COMPARE_NULL 1 2198 #if defined(__SYMBIAN32__) || defined(__IBMCPP__) 2199 # define GTEST_NEEDS_IS_POINTER_ 1 2202 template <
bool bool_value>
2205 static const bool value = bool_value;
2212 template <
typename T>
2215 template <
typename T>
2218 template <
typename Iterator>
2223 template <
typename T>
2228 template <
typename T>
2233 #if GTEST_OS_WINDOWS 2234 # define GTEST_PATH_SEP_ "\\" 2235 # define GTEST_HAS_ALT_PATH_SEP_ 1 2239 # define GTEST_PATH_SEP_ "/" 2240 # define GTEST_HAS_ALT_PATH_SEP_ 0 2242 #endif // GTEST_OS_WINDOWS 2252 return isalpha(static_cast<unsigned char>(ch)) != 0;
2255 return isalnum(static_cast<unsigned char>(ch)) != 0;
2258 return isdigit(static_cast<unsigned char>(ch)) != 0;
2261 return islower(static_cast<unsigned char>(ch)) != 0;
2264 return isspace(static_cast<unsigned char>(ch)) != 0;
2267 return isupper(static_cast<unsigned char>(ch)) != 0;
2270 return isxdigit(static_cast<unsigned char>(ch)) != 0;
2273 const unsigned char low_byte =
static_cast<unsigned char>(ch);
2274 return ch == low_byte && isxdigit(low_byte) != 0;
2278 return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
2281 return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
2285 std::string::iterator it = str.end();
2286 while (it != str.begin() &&
IsSpace(*--it))
2301 #if GTEST_OS_WINDOWS 2303 typedef struct _stat StatStruct;
2305 # ifdef __BORLANDC__ 2306 inline int IsATTY(
int fd) {
return isatty(fd); }
2307 inline int StrCaseCmp(
const char* s1,
const char* s2) {
2308 return stricmp(s1, s2);
2310 inline char*
StrDup(
const char* src) {
return strdup(src); }
2311 # else // !__BORLANDC__ 2312 # if GTEST_OS_WINDOWS_MOBILE 2313 inline int IsATTY(
int ) {
return 0; }
2315 inline int IsATTY(
int fd) {
return _isatty(fd); }
2316 # endif // GTEST_OS_WINDOWS_MOBILE 2317 inline int StrCaseCmp(
const char* s1,
const char* s2) {
2318 return _stricmp(s1, s2);
2320 inline char*
StrDup(
const char* src) {
return _strdup(src); }
2321 # endif // __BORLANDC__ 2323 # if GTEST_OS_WINDOWS_MOBILE 2324 inline int FileNo(FILE* file) {
return reinterpret_cast<int>(_fileno(file)); }
2328 inline int FileNo(FILE* file) {
return _fileno(file); }
2329 inline int Stat(
const char* path, StatStruct* buf) {
return _stat(path, buf); }
2330 inline int RmDir(
const char* dir) {
return _rmdir(dir); }
2331 inline bool IsDir(
const StatStruct& st) {
2332 return (_S_IFDIR & st.st_mode) != 0;
2334 # endif // GTEST_OS_WINDOWS_MOBILE 2338 typedef struct stat StatStruct;
2340 inline int FileNo(FILE* file) {
return fileno(file); }
2341 inline int IsATTY(
int fd) {
return isatty(fd); }
2342 inline int Stat(
const char* path, StatStruct* buf) {
return stat(path, buf); }
2344 return strcasecmp(s1, s2);
2346 inline char*
StrDup(
const char* src) {
return strdup(src); }
2347 inline int RmDir(
const char* dir) {
return rmdir(dir); }
2348 inline bool IsDir(
const StatStruct& st) {
return S_ISDIR(st.st_mode); }
2350 #endif // GTEST_OS_WINDOWS 2357 return strncpy(dest, src, n);
2364 #if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT 2365 inline int ChDir(
const char* dir) {
return chdir(dir); }
2367 inline FILE*
FOpen(
const char* path,
const char* mode) {
2368 return fopen(path, mode);
2370 #if !GTEST_OS_WINDOWS_MOBILE 2371 inline FILE *
FReopen(
const char* path,
const char* mode, FILE* stream) {
2372 return freopen(path, mode, stream);
2374 inline FILE*
FDOpen(
int fd,
const char* mode) {
return fdopen(fd, mode); }
2376 inline int FClose(FILE* fp) {
return fclose(fp); }
2377 #if !GTEST_OS_WINDOWS_MOBILE 2379 return static_cast<int>(read(fd, buf, count));
2382 return static_cast<int>(write(fd, buf, count));
2384 inline int Close(
int fd) {
return close(fd); }
2385 inline const char*
StrError(
int errnum) {
return strerror(errnum); }
2387 inline const char*
GetEnv(
const char* name) {
2388 #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE | GTEST_OS_WINDOWS_RT 2390 static_cast<void>(name);
2392 #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) 2395 const char*
const env = getenv(name);
2396 return (env != NULL && env[0] !=
'\0') ? env : NULL;
2398 return getenv(name);
2404 #if GTEST_OS_WINDOWS_MOBILE 2411 #endif // GTEST_OS_WINDOWS_MOBILE 2420 #if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE 2422 # define GTEST_SNPRINTF_(buffer, size, format, ...) \ 2423 _snprintf_s(buffer, size, size, format, __VA_ARGS__) 2424 #elif defined(_MSC_VER) 2427 # define GTEST_SNPRINTF_ _snprintf 2429 # define GTEST_SNPRINTF_ snprintf 2460 template <
size_t size>
2484 #if GTEST_OS_WINDOWS 2485 typedef __int64
Int;
2486 typedef unsigned __int64
UInt;
2490 #endif // GTEST_OS_WINDOWS 2503 #if !defined(GTEST_FLAG) 2504 # define GTEST_FLAG(name) FLAGS_gtest_##name 2505 #endif // !defined(GTEST_FLAG) 2507 #if !defined(GTEST_USE_OWN_FLAGFILE_FLAG_) 2508 # define GTEST_USE_OWN_FLAGFILE_FLAG_ 1 2509 #endif // !defined(GTEST_USE_OWN_FLAGFILE_FLAG_) 2511 #if !defined(GTEST_DECLARE_bool_) 2512 # define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver 2515 # define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name) 2516 # define GTEST_DECLARE_int32_(name) \ 2517 GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name) 2518 #define GTEST_DECLARE_string_(name) \ 2519 GTEST_API_ extern ::std::string GTEST_FLAG(name) 2522 #define GTEST_DEFINE_bool_(name, default_val, doc) \ 2523 GTEST_API_ bool GTEST_FLAG(name) = (default_val) 2524 #define GTEST_DEFINE_int32_(name, default_val, doc) \ 2525 GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val) 2526 #define GTEST_DEFINE_string_(name, default_val, doc) \ 2527 GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val) 2529 #endif // !defined(GTEST_DECLARE_bool_) 2532 #if !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_) 2533 # define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) 2534 # define GTEST_LOCK_EXCLUDED_(locks) 2535 #endif // !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_) 2543 bool ParseInt32(
const Message& src_text,
const char* str, Int32* value);
2554 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ FILE * FReopen(const char *path, const char *mode, FILE *stream)
Definition: gtest-port.h:2371
std::string StringFromGTestEnv(const char *flag, const char *default_val)
scoped_ptr(T *p=NULL)
Definition: gtest-port.h:1119
const T * pointer() const
Definition: gtest-port.h:2167
Definition: gtest-port.h:2154
GTEST_API_ std::string GetCapturedStdout()
GTEST_API_ std::string GetCapturedStderr()
To ImplicitCast_(To x)
Definition: gtest-port.h:1343
void Unlock()
Definition: gtest-port.h:2140
Definition: gmock-actions.h:53
GTEST_API_ std::string TempDir()
int * count
Definition: gmock_stress_test.cc:176
void reset(T *p=NULL)
Definition: gtest-port.h:1132
int FClose(FILE *fp)
Definition: gtest-port.h:2376
GTEST_API_ size_t GetThreadCount()
def Run(command)
Definition: gtest_break_on_failure_unittest.py:80
#define GTEST_INTENTIONAL_CONST_COND_PUSH_()
Definition: gtest-port.h:897
const char * pattern() const
Definition: gtest-port.h:1175
static bool PartialMatch(const ::std::string &str, const RE &re)
Definition: gtest-port.h:1187
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
Definition: gtest-port.h:318
GTEST_API_ bool IsTrue(bool condition)
GTEST_API_ std::string ReadEntireFile(FILE *file)
Definition: gtest-port.h:1246
unsigned long long UInt
Definition: gtest-port.h:2489
Definition: gtest-port.h:1254
int IsATTY(int fd)
Definition: gtest-port.h:2341
::std::string string
Definition: gtest-port.h:1097
bool_constant< bool_value > type
Definition: gtest-port.h:2204
void UInt
Definition: gtest-port.h:2465
Definition: gtest-port.h:2213
bool ParseInt32(const Message &src_text, const char *str, Int32 *value)
Definition: gtest-port.h:2219
::std::wstring wstring
Definition: gtest-port.h:1103
RE(const char *regex)
Definition: gtest-port.h:1171
bool IsDigit(char ch)
Definition: gtest-port.h:2257
dest
Definition: upload.py:394
Definition: gtest-port.h:1248
Definition: CapabilityConfiguration.h:190
int Stat(const char *path, StatStruct *buf)
Definition: gtest-port.h:2342
T * release()
Definition: gtest-port.h:1126
int ChDir(const char *dir)
Definition: gtest-port.h:2365
const char * GetEnv(const char *name)
Definition: gtest-port.h:2387
#define GTEST_API_
Definition: gtest-port.h:934
GTEST_API_ void CaptureStdout()
TypeWithSize< 8 >::Int TimeInMillis
Definition: gtest-port.h:2498
~scoped_ptr()
Definition: gtest-port.h:1120
GTestLogSeverity
Definition: gtest-port.h:1244
bool_constant< true > true_type
Definition: gtest-port.h:2210
ThreadLocal(const T &value)
Definition: gtest-port.h:2165
To DownCast_(From *f)
Definition: gtest-port.h:1367
T & operator*() const
Definition: gtest-port.h:1122
tuple make_tuple()
Definition: gtest-tuple.h:675
GTEST_API_ size_t GetFileSize(FILE *file)
#define GTEST_DISALLOW_ASSIGN_(type)
Definition: gtest-port.h:869
bool_constant< false > false_type
Definition: gtest-port.h:2209
TypeWithSize< 4 >::UInt UInt32
Definition: gtest-port.h:2495
void Lock()
Definition: gtest-port.h:2139
GTEST_API_ ::std::string FormatFileLocation(const char *file, int line)
int Write(int fd, const void *buf, unsigned int count)
Definition: gtest-port.h:2381
char ToLower(char ch)
Definition: gtest-port.h:2277
Mutex()
Definition: gtest-port.h:2138
TypeWithSize< 4 >::Int Int32
Definition: gtest-port.h:2494
bool IsSpace(char ch)
Definition: gtest-port.h:2263
::std::ostream & GetStream()
Definition: gtest-port.h:1261
int RmDir(const char *dir)
Definition: gtest-port.h:2347
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
Definition: gtest-port.h:317
#define GTEST_CHECK_(condition)
Definition: gtest-port.h:1295
static bool FullMatch(const ::std::string &str, const RE &re)
Definition: gtest-port.h:1184
Definition: gtest-port.h:1084
void LogToStderr()
Definition: gtest-port.h:1275
friend void swap(scoped_ptr &a, scoped_ptr &b)
Definition: gtest-port.h:1141
int Read(int fd, void *buf, unsigned int count)
Definition: gtest-port.h:2378
GTestMutexLock MutexLock
Definition: gtest-port.h:2159
T value_type
Definition: gtest-port.h:2230
Definition: gtest-port.h:1247
int StrCaseCmp(const char *s1, const char *s2)
Definition: gtest-port.h:2343
long long BiggestInt
Definition: gtest-port.h:2241
Definition: gtest-port.h:1156
bool IsDir(const StatStruct &st)
Definition: gtest-port.h:2348
Definition: gtest-port.h:2461
bool IsAlpha(char ch)
Definition: gtest-port.h:2251
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
Definition: gtest-port.h:1308
Definition: gtest-port.h:2203
unsigned int UInt
Definition: gtest-port.h:2477
int FileNo(FILE *file)
Definition: gtest-port.h:2340
Definition: gtest-port.h:1245
bool BoolFromGTestEnv(const char *flag, bool default_val)
FILE * FOpen(const char *path, const char *mode)
Definition: gtest-port.h:2367
bool IsLower(char ch)
Definition: gtest-port.h:2260
int Close(int fd)
Definition: gtest-port.h:2384
bool IsXDigit(wchar_t ch)
Definition: gtest-port.h:2272
RE(const RE &other)
Definition: gtest-port.h:1160
GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char *file, int line)
char ToUpper(char ch)
Definition: gtest-port.h:2280
GTEST_API_ void CaptureStderr()
void Abort()
Definition: gtest-port.h:2410
Definition: gtest-port.h:2162
T value_type
Definition: gtest-port.h:2225
const
Definition: upload.py:398
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition: gtest-port.h:874
void FlushInfoLog()
Definition: gtest-port.h:1276
const char * StrNCpy(char *dest, const char *src, size_t n)
Definition: gtest-port.h:2356
GTEST_API_ Int32 Int32FromGTestEnv(const char *flag, Int32 default_val)
TypeWithSize< 8 >::UInt UInt64
Definition: gtest-port.h:2497
GTEST_API_ const ::std::vector< testing::internal::string > & GetArgvs()
bool IsUpper(char ch)
Definition: gtest-port.h:2266
GTestMutexLock(Mutex *)
Definition: gtest-port.h:2156
T * operator->() const
Definition: gtest-port.h:1123
RE(const ::std::string ®ex)
Definition: gtest-port.h:1163
Definition: gtest-port_test.cc:202
Definition: gtest-port.h:1029
TypeWithSize< 8 >::Int Int64
Definition: gtest-port.h:2496
int Int
Definition: gtest-port.h:2476
void AssertHeld() const
Definition: gtest-port.h:2141
Iterator::value_type value_type
Definition: gtest-port.h:2220
Definition: gtest-port.h:1115
long long Int
Definition: gtest-port.h:2488
ThreadLocal()
Definition: gtest-port.h:2164
FILE * FDOpen(int fd, const char *mode)
Definition: gtest-port.h:2374
const BiggestInt kMaxBiggestInt
Definition: gtest-port.h:2439
char * StrDup(const char *src)
Definition: gtest-port.h:2346
const char * StrError(int errnum)
Definition: gtest-port.h:2385
Derived * CheckedDowncastToActualType(Base *base)
Definition: gtest-port.h:1392
const T & move(const T &t)
Definition: gtest-port.h:1317
std::string StripTrailingSpaces(std::string str)
Definition: gtest-port.h:2284
static const std::string key
The database key to be used by the protocol given the METADATA object.
Definition: SharedAVSSettingProtocolTest.cpp:58
Definition: gtest-port.h:2297
#define GTEST_INTENTIONAL_CONST_COND_POP_()
Definition: gtest-port.h:899
T * pointer()
Definition: gtest-port.h:2166
T element_type
Definition: gtest-port.h:1117
bool IsAlNum(char ch)
Definition: gtest-port.h:2254