40#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
41#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
202# include <sys/types.h>
203# include <sys/stat.h>
207# include <AvailabilityMacros.h>
208# include <TargetConditionals.h>
215#define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
216#define GTEST_FLAG_PREFIX_ "gtest_"
217#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
218#define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
219#define GTEST_NAME_ "Google Test"
220#define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
225# define GTEST_GCC_VER_ \
226 (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
231# define GTEST_OS_CYGWIN 1
232#elif defined __SYMBIAN32__
233# define GTEST_OS_SYMBIAN 1
235# define GTEST_OS_WINDOWS 1
237# define GTEST_OS_WINDOWS_MOBILE 1
238# elif defined(__MINGW__) || defined(__MINGW32__)
239# define GTEST_OS_WINDOWS_MINGW 1
241# define GTEST_OS_WINDOWS_DESKTOP 1
243#elif defined __APPLE__
244# define GTEST_OS_MAC 1
246# define GTEST_OS_IOS 1
247# if TARGET_IPHONE_SIMULATOR
248# define GTEST_OS_IOS_SIMULATOR 1
251#elif defined __linux__
252# define GTEST_OS_LINUX 1
253# if defined __ANDROID__
254# define GTEST_OS_LINUX_ANDROID 1
257# define GTEST_OS_ZOS 1
258#elif defined(__sun) && defined(__SVR4)
259# define GTEST_OS_SOLARIS 1
261# define GTEST_OS_AIX 1
263# define GTEST_OS_HPUX 1
264#elif defined __native_client__
265# define GTEST_OS_NACL 1
266#elif defined __OpenBSD__
267# define GTEST_OS_OPENBSD 1
269# define GTEST_OS_QNX 1
272#ifndef GTEST_LANG_CXX11
277# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L
279# define GTEST_LANG_CXX11 1
281# define GTEST_LANG_CXX11 0
294#elif !GTEST_OS_WINDOWS_MOBILE
299#if GTEST_OS_LINUX_ANDROID
301# include <android/api-level.h>
305#ifndef GTEST_HAS_POSIX_RE
306# if GTEST_OS_LINUX_ANDROID
308# define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)
310# define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
314#if GTEST_HAS_POSIX_RE
322# define GTEST_USES_POSIX_RE 1
324#elif GTEST_OS_WINDOWS
328# define GTEST_USES_SIMPLE_RE 1
334# define GTEST_USES_SIMPLE_RE 1
338#ifndef GTEST_HAS_EXCEPTIONS
341# if defined(_MSC_VER) || defined(__BORLANDC__)
345# ifndef _HAS_EXCEPTIONS
346# define _HAS_EXCEPTIONS 1
348# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
349# elif defined(__GNUC__) && __EXCEPTIONS
351# define GTEST_HAS_EXCEPTIONS 1
352# elif defined(__SUNPRO_CC)
356# define GTEST_HAS_EXCEPTIONS 1
357# elif defined(__IBMCPP__) && __EXCEPTIONS
359# define GTEST_HAS_EXCEPTIONS 1
360# elif defined(__HP_aCC)
363# define GTEST_HAS_EXCEPTIONS 1
367# define GTEST_HAS_EXCEPTIONS 0
371#if !defined(GTEST_HAS_STD_STRING)
374# define GTEST_HAS_STD_STRING 1
375#elif !GTEST_HAS_STD_STRING
377# error "Google Test cannot be used where ::std::string isn't available."
380#ifndef GTEST_HAS_GLOBAL_STRING
384# define GTEST_HAS_GLOBAL_STRING 0
388#ifndef GTEST_HAS_STD_WSTRING
397# define GTEST_HAS_STD_WSTRING \
398 (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
402#ifndef GTEST_HAS_GLOBAL_WSTRING
405# define GTEST_HAS_GLOBAL_WSTRING \
406 (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
410#ifndef GTEST_HAS_RTTI
417# define GTEST_HAS_RTTI 1
419# define GTEST_HAS_RTTI 0
423# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
430# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \
431 !defined(__EXCEPTIONS)
432# define GTEST_HAS_RTTI 0
434# define GTEST_HAS_RTTI 1
437# define GTEST_HAS_RTTI 0
443# elif defined(__clang__)
445# define GTEST_HAS_RTTI __has_feature(cxx_rtti)
449# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
452# define GTEST_HAS_RTTI 1
454# define GTEST_HAS_RTTI 0
460# define GTEST_HAS_RTTI 1
473#ifndef GTEST_HAS_PTHREAD
479# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
495#ifndef GTEST_HAS_TR1_TUPLE
496# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
498# define GTEST_HAS_TR1_TUPLE 0
501# define GTEST_HAS_TR1_TUPLE 1
507#ifndef GTEST_USE_OWN_TR1_TUPLE
520# if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \
521 && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600
522# define GTEST_ENV_HAS_TR1_TUPLE_ 1
528# if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)
529# define GTEST_ENV_HAS_STD_TUPLE_ 1
532# if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_
533# define GTEST_USE_OWN_TR1_TUPLE 0
535# define GTEST_USE_OWN_TR1_TUPLE 1
543#if GTEST_HAS_TR1_TUPLE
545# if GTEST_USE_OWN_TR1_TUPLE
546# include "gtest/internal/gtest-tuple.h"
547# elif GTEST_ENV_HAS_STD_TUPLE_
556using ::std::make_tuple;
558using ::std::tuple_element;
559using ::std::tuple_size;
563# elif GTEST_OS_SYMBIAN
570# ifdef BOOST_HAS_TR1_TUPLE
571# undef BOOST_HAS_TR1_TUPLE
576# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
579# elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)
583# if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
589# define _TR1_FUNCTIONAL 1
591# undef _TR1_FUNCTIONAL
609#ifndef GTEST_HAS_CLONE
612# if GTEST_OS_LINUX && !defined(__ia64__)
613# if GTEST_OS_LINUX_ANDROID
615# if defined(__arm__) && __ANDROID_API__ >= 9
616# define GTEST_HAS_CLONE 1
618# define GTEST_HAS_CLONE 0
621# define GTEST_HAS_CLONE 1
624# define GTEST_HAS_CLONE 0
631#ifndef GTEST_HAS_STREAM_REDIRECTION
634# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN
635# define GTEST_HAS_STREAM_REDIRECTION 0
637# define GTEST_HAS_STREAM_REDIRECTION 1
645#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
646 (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \
647 (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
648 GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
649 GTEST_OS_OPENBSD || GTEST_OS_QNX)
650# define GTEST_HAS_DEATH_TEST 1
657#define GTEST_HAS_PARAM_TEST 1
663#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
664 defined(__IBMCPP__) || defined(__HP_aCC)
665# define GTEST_HAS_TYPED_TEST 1
666# define GTEST_HAS_TYPED_TEST_P 1
673#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
674# define GTEST_HAS_COMBINE 1
678#define GTEST_WIDE_STRING_USES_UTF16_ \
679 (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
683# define GTEST_CAN_STREAM_RESULTS_ 1
696#ifdef __INTEL_COMPILER
697# define GTEST_AMBIGUOUS_ELSE_BLOCKER_
699# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default:
713#if defined(__GNUC__) && !defined(COMPILER_ICC)
714# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
716# define GTEST_ATTRIBUTE_UNUSED_
721#define GTEST_DISALLOW_ASSIGN_(type)\
722 void operator=(type const &)
726#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
728 GTEST_DISALLOW_ASSIGN_(type)
735#if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)
736# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
738# define GTEST_MUST_USE_RESULT_
747# if defined(_MSC_VER) || defined(__BORLANDC__)
749# define GTEST_HAS_SEH 1
752# define GTEST_HAS_SEH 0
759# if GTEST_LINKED_AS_SHARED_LIBRARY
760# define GTEST_API_ __declspec(dllimport)
761# elif GTEST_CREATE_SHARED_LIBRARY
762# define GTEST_API_ __declspec(dllexport)
773# define GTEST_NO_INLINE_ __attribute__((noinline))
775# define GTEST_NO_INLINE_
779#if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
780# define GTEST_HAS_CXXABI_H_ 1
782# define GTEST_HAS_CXXABI_H_ 0
812struct CompileAssert {
815#define GTEST_COMPILE_ASSERT_(expr, msg) \
816 typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
817 msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_
863template <
typename T1,
typename T2>
864struct StaticAssertTypeEqHelper;
867struct StaticAssertTypeEqHelper<T, T> {};
869#if GTEST_HAS_GLOBAL_STRING
872typedef ::std::string
string;
875#if GTEST_HAS_GLOBAL_WSTRING
877#elif GTEST_HAS_STD_WSTRING
899 T*
get()
const {
return ptr_; }
909 if (
IsTrue(
sizeof(T) > 0)) {
933 RE(const ::std::string& regex) { Init(regex.c_str()); }
935#if GTEST_HAS_GLOBAL_STRING
937 RE(const ::string& regex) { Init(regex.c_str()); }
941 RE(
const char* regex) { Init(regex); }
945 const char*
pattern()
const {
return pattern_; }
961#if GTEST_HAS_GLOBAL_STRING
963 static bool FullMatch(const ::string& str,
const RE& re) {
964 return FullMatch(str.c_str(), re);
966 static bool PartialMatch(const ::string& str,
const RE& re) {
967 return PartialMatch(str.c_str(), re);
976 void Init(
const char* regex);
981 const char* pattern_;
984#if GTEST_USES_POSIX_RE
987 regex_t partial_regex_;
991 const char* full_pattern_;
1039#define GTEST_LOG_(severity) \
1040 ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
1041 __FILE__, __LINE__).GetStream()
1060#define GTEST_CHECK_(condition) \
1061 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
1062 if (::testing::internal::IsTrue(condition)) \
1065 GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
1072#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
1073 if (const int gtest_error = (posix_call)) \
1074 GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
1097template<
typename To>
1121template<
typename To,
typename From>
1134 GTEST_CHECK_(f == NULL ||
dynamic_cast<To
>(f) != NULL);
1136 return static_cast<To
>(f);
1144template <
class Derived,
class Base>
1148 return dynamic_cast<Derived*
>(base);
1150 return static_cast<Derived*
>(base);
1154#if GTEST_HAS_STREAM_REDIRECTION
1170#if GTEST_HAS_DEATH_TEST
1172const ::std::vector<testing::internal::string>& GetInjectableArgvs();
1173void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
1177extern ::std::vector<testing::internal::string> g_argvs;
1183#if GTEST_HAS_PTHREAD
1188inline void SleepMilliseconds(
int n) {
1189 const timespec time = {
1193 nanosleep(&time, NULL);
1204 Notification() : notified_(false) {
1208 pthread_mutex_destroy(&mutex_);
1214 pthread_mutex_lock(&mutex_);
1216 pthread_mutex_unlock(&mutex_);
1221 void WaitForNotification() {
1223 pthread_mutex_lock(&mutex_);
1224 const bool notified = notified_;
1225 pthread_mutex_unlock(&mutex_);
1228 SleepMilliseconds(10);
1233 pthread_mutex_t mutex_;
1244class ThreadWithParamBase {
1246 virtual ~ThreadWithParamBase() {}
1247 virtual void Run() = 0;
1256extern "C" inline void* ThreadFuncWithCLinkage(
void* thread) {
1257 static_cast<ThreadWithParamBase*
>(thread)->Run();
1273template <
typename T>
1274class ThreadWithParam :
public ThreadWithParamBase {
1276 typedef void (*UserThreadFunc)(T);
1279 UserThreadFunc func, T param, Notification* thread_can_start)
1282 thread_can_start_(thread_can_start),
1284 ThreadWithParamBase*
const base =
this;
1288 pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
1290 ~ThreadWithParam() { Join(); }
1299 virtual void Run() {
1300 if (thread_can_start_ != NULL)
1301 thread_can_start_->WaitForNotification();
1306 const UserThreadFunc func_;
1310 Notification*
const thread_can_start_;
1341 owner_ = pthread_self();
1357 void AssertHeld()
const {
1358 GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
1359 <<
"The current thread is not holding the mutex @" <<
this;
1368 pthread_mutex_t mutex_;
1380# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
1381 extern ::testing::internal::MutexBase mutex
1389# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
1390 ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
1394class Mutex :
public MutexBase {
1414 : mutex_(mutex) { mutex_->Lock(); }
1419 MutexBase*
const mutex_;
1432class ThreadLocalValueHolderBase {
1434 virtual ~ThreadLocalValueHolderBase() {}
1439extern "C" inline void DeleteThreadLocalValue(
void* value_holder) {
1440 delete static_cast<ThreadLocalValueHolderBase*
>(value_holder);
1472template <
typename T>
1482 DeleteThreadLocalValue(pthread_getspecific(key_));
1489 T*
pointer() {
return GetOrCreateValue(); }
1490 const T*
pointer()
const {
return GetOrCreateValue(); }
1496 class ValueHolder :
public ThreadLocalValueHolderBase {
1498 explicit ValueHolder(
const T& value) : value_(value) {}
1500 T* pointer() {
return &value_; }
1507 static pthread_key_t CreateKey() {
1512 pthread_key_create(&key, &DeleteThreadLocalValue));
1516 T* GetOrCreateValue()
const {
1517 ThreadLocalValueHolderBase*
const holder =
1518 static_cast<ThreadLocalValueHolderBase*
>(pthread_getspecific(key_));
1519 if (holder != NULL) {
1523 ValueHolder*
const new_holder =
new ValueHolder(default_);
1524 ThreadLocalValueHolderBase*
const holder_base = new_holder;
1526 return new_holder->pointer();
1530 const pthread_key_t key_;
1536# define GTEST_IS_THREADSAFE 1
1553# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
1554 extern ::testing::internal::Mutex mutex
1556# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
1558class GTestMutexLock {
1565template <
typename T>
1572 const T&
get()
const {
return value_; }
1580# define GTEST_IS_THREADSAFE 0
1594#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
1597# define GTEST_ELLIPSIS_NEEDS_POD_ 1
1599# define GTEST_CAN_COMPARE_NULL 1
1606#if defined(__SYMBIAN32__) || defined(__IBMCPP__)
1607# define GTEST_NEEDS_IS_POINTER_ 1
1610template <
bool bool_value>
1611struct bool_constant {
1613 static const bool value = bool_value;
1620template <
typename T>
1623template <
typename T>
1624struct is_pointer<T*> :
public true_type {};
1626template <
typename Iterator>
1627struct IteratorTraits {
1631template <
typename T>
1636template <
typename T>
1642# define GTEST_PATH_SEP_ "\\"
1643# define GTEST_HAS_ALT_PATH_SEP_ 1
1647# define GTEST_PATH_SEP_ "/"
1648# define GTEST_HAS_ALT_PATH_SEP_ 0
1660 return isalpha(
static_cast<unsigned char>(ch)) != 0;
1663 return isalnum(
static_cast<unsigned char>(ch)) != 0;
1666 return isdigit(
static_cast<unsigned char>(ch)) != 0;
1669 return islower(
static_cast<unsigned char>(ch)) != 0;
1672 return isspace(
static_cast<unsigned char>(ch)) != 0;
1675 return isupper(
static_cast<unsigned char>(ch)) != 0;
1678 return isxdigit(
static_cast<unsigned char>(ch)) != 0;
1681 const unsigned char low_byte =
static_cast<unsigned char>(ch);
1682 return ch == low_byte && isxdigit(low_byte) != 0;
1686 return static_cast<char>(tolower(
static_cast<unsigned char>(ch)));
1689 return static_cast<char>(toupper(
static_cast<unsigned char>(ch)));
1707inline int IsATTY(
int fd) {
return isatty(fd); }
1708inline int StrCaseCmp(
const char* s1,
const char* s2) {
1709 return stricmp(s1, s2);
1711inline char*
StrDup(
const char* src) {
return strdup(src); }
1713# if GTEST_OS_WINDOWS_MOBILE
1714inline int IsATTY(
int ) {
return 0; }
1716inline int IsATTY(
int fd) {
return _isatty(fd); }
1718inline int StrCaseCmp(
const char* s1,
const char* s2) {
1719 return _stricmp(s1, s2);
1721inline char*
StrDup(
const char* src) {
return _strdup(src); }
1724# if GTEST_OS_WINDOWS_MOBILE
1725inline int FileNo(FILE* file) {
return reinterpret_cast<int>(_fileno(file)); }
1729inline int FileNo(FILE* file) {
return _fileno(file); }
1730inline int Stat(
const char* path,
StatStruct* buf) {
return _stat(path, buf); }
1731inline int RmDir(
const char* dir) {
return _rmdir(dir); }
1733 return (_S_IFDIR & st.st_mode) != 0;
1741inline int FileNo(FILE* file) {
return fileno(file); }
1742inline int IsATTY(
int fd) {
return isatty(fd); }
1743inline int Stat(
const char* path,
StatStruct* buf) {
return stat(path, buf); }
1744inline int StrCaseCmp(
const char* s1,
const char* s2) {
1745 return strcasecmp(s1, s2);
1747inline char*
StrDup(
const char* src) {
return strdup(src); }
1748inline int RmDir(
const char* dir) {
return rmdir(dir); }
1749inline bool IsDir(
const StatStruct& st) {
return S_ISDIR(st.st_mode); }
1757# pragma warning(push)
1758# pragma warning(disable:4996)
1761inline const char*
StrNCpy(
char* dest,
const char* src,
size_t n) {
1762 return strncpy(dest, src, n);
1769#if !GTEST_OS_WINDOWS_MOBILE
1770inline int ChDir(
const char* dir) {
return chdir(dir); }
1772inline FILE*
FOpen(
const char* path,
const char* mode) {
1773 return fopen(path, mode);
1775#if !GTEST_OS_WINDOWS_MOBILE
1776inline FILE *
FReopen(
const char* path,
const char* mode, FILE* stream) {
1777 return freopen(path, mode, stream);
1779inline FILE*
FDOpen(
int fd,
const char* mode) {
return fdopen(fd, mode); }
1781inline int FClose(FILE* fp) {
return fclose(fp); }
1782#if !GTEST_OS_WINDOWS_MOBILE
1783inline int Read(
int fd,
void* buf,
unsigned int count) {
1784 return static_cast<int>(read(fd, buf, count));
1786inline int Write(
int fd,
const void* buf,
unsigned int count) {
1787 return static_cast<int>(write(fd, buf, count));
1789inline int Close(
int fd) {
return close(fd); }
1790inline const char*
StrError(
int errnum) {
return strerror(errnum); }
1792inline const char*
GetEnv(
const char* name) {
1793#if GTEST_OS_WINDOWS_MOBILE
1796#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
1799 const char*
const env = getenv(name);
1800 return (env != NULL && env[0] !=
'\0') ? env : NULL;
1802 return getenv(name);
1807# pragma warning(pop)
1810#if GTEST_OS_WINDOWS_MOBILE
1816inline void Abort() { abort(); }
1826#if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
1828# define GTEST_SNPRINTF_(buffer, size, format, ...) \
1829 _snprintf_s(buffer, size, size, format, __VA_ARGS__)
1830#elif defined(_MSC_VER)
1833# define GTEST_SNPRINTF_ _snprintf
1835# define GTEST_SNPRINTF_ snprintf
1866template <
size_t size>
1891 typedef __int64
Int;
1892 typedef unsigned __int64
UInt;
1909#define GTEST_FLAG(name) FLAGS_gtest_##name
1912#define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
1913#define GTEST_DECLARE_int32_(name) \
1914 GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
1915#define GTEST_DECLARE_string_(name) \
1916 GTEST_API_ extern ::std::string GTEST_FLAG(name)
1919#define GTEST_DEFINE_bool_(name, default_val, doc) \
1920 GTEST_API_ bool GTEST_FLAG(name) = (default_val)
1921#define GTEST_DEFINE_int32_(name, default_val, doc) \
1922 GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
1923#define GTEST_DEFINE_string_(name, default_val, doc) \
1924 GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
1927#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
1928#define GTEST_LOCK_EXCLUDED_(locks)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1024
GTestLog(GTestLogSeverity severity, const char *file, int line)
::std::ostream & GetStream()
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1031
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1558
GTestMutexLock(Mutex *)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1560
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1545
void Unlock()
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1549
Mutex()
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1547
void Lock()
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1548
void AssertHeld() const
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1550
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:926
static bool PartialMatch(const ::std::string &str, const RE &re)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:957
static bool FullMatch(const char *str, const RE &re)
const char * pattern() const
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:945
RE(const ::std::string ®ex)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:933
RE(const char *regex)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:941
static bool PartialMatch(const char *str, const RE &re)
static bool FullMatch(const ::std::string &str, const RE &re)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:954
RE(const RE &other)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:930
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1566
ThreadLocal()
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1568
T * pointer()
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1570
ThreadLocal(const T &value)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1569
void set(const T &value)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1573
const T * pointer() const
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1571
const T & get() const
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1572
unsigned int UInt
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1883
int Int
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1882
long long Int
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1894
unsigned long long UInt
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1895
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1867
void UInt
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1871
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:890
T & operator*() const
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:897
T * operator->() const
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:898
T * get() const
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:899
T * release()
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:901
~scoped_ptr()
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:895
void reset(T *p=NULL)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:907
scoped_ptr(T *p=NULL)
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:894
T element_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:892
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1072
#define GTEST_API_
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:768
#define GTEST_CHECK_(condition)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1060
#define GTEST_DISALLOW_ASSIGN_(type)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:721
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:726
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1698
int Close(int fd)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1789
int IsATTY(int fd)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1742
int ChDir(const char *dir)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1770
int StrCaseCmp(const char *s1, const char *s2)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1744
int Stat(const char *path, StatStruct *buf)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1743
int FileNo(FILE *file)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1741
int Read(int fd, void *buf, unsigned int count)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1783
const char * StrNCpy(char *dest, const char *src, size_t n)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1761
char * StrDup(const char *src)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1747
void Abort()
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1816
const char * StrError(int errnum)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1790
FILE * FReopen(const char *path, const char *mode, FILE *stream)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1776
FILE * FDOpen(int fd, const char *mode)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1779
struct stat StatStruct
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1739
const char * GetEnv(const char *name)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1792
int RmDir(const char *dir)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1748
bool IsDir(const StatStruct &st)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1749
int Write(int fd, const void *buf, unsigned int count)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1786
int FClose(FILE *fp)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1781
FILE * FOpen(const char *path, const char *mode)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1772
bool_constant< true > true_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1618
long long BiggestInt
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1649
void LogToStderr()
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1043
GTestMutexLock MutexLock
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1563
To DownCast_(From *f)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1122
GTEST_API_::std::string FormatCompilerIndependentFileLocation(const char *file, int line)
void FlushInfoLog()
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1044
GTEST_API_ Int32 Int32FromGTestEnv(const char *flag, Int32 default_val)
GTEST_API_::std::string FormatFileLocation(const char *file, int line)
GTEST_API_ std::string GetCapturedStderr()
::std::wstring wstring
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:878
TypeWithSize< 4 >::UInt UInt32
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1901
bool IsDigit(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1665
TypeWithSize< 8 >::Int TimeInMillis
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1904
bool BoolFromGTestEnv(const char *flag, bool default_val)
const char * StringFromGTestEnv(const char *flag, const char *default_val)
bool IsAlNum(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1662
bool IsUpper(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1674
GTEST_API_ size_t GetThreadCount()
::std::string string
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:872
GTEST_API_ void CaptureStderr()
bool_constant< false > false_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1617
To ImplicitCast_(To x)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1098
bool IsXDigit(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1677
const bool ImplicitlyConvertible< From, To >::value
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:826
GTestLogSeverity
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1014
@ GTEST_FATAL
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1018
@ GTEST_WARNING
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1016
@ GTEST_INFO
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1015
@ GTEST_ERROR
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1017
GTEST_API_ bool IsTrue(bool condition)
TypeWithSize< 8 >::Int Int64
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1902
bool ParseInt32(const Message &src_text, const char *str, Int32 *value)
char ToUpper(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1688
bool IsLower(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1668
GTEST_API_ void CaptureStdout()
TypeWithSize< 8 >::UInt UInt64
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1903
const BiggestInt kMaxBiggestInt
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1845
char ToLower(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1685
bool IsAlpha(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1659
GTEST_API_ std::string GetCapturedStdout()
bool IsSpace(char ch)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1671
Derived * CheckedDowncastToActualType(Base *base)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1145
TypeWithSize< 4 >::Int Int32
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1900
Definition dsd/test/gmock/include/gmock/gmock-actions.h:49
const T * DefaultValue< T >::value_
Definition dsd/test/gmock/include/gmock/gmock-actions.h:244
T value_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1633
T value_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1638
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1627
Iterator::value_type value_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1628
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1611
static const bool value
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1613
bool_constant< bool_value > type
Definition mbelib/test/gtest/include/gtest/internal/gtest-port.h:1612
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1621