Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
gtest-port.h File Reference
#include <ctype.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <iostream>
#include <sstream>
#include <string>
#include <unistd.h>
#include <strings.h>
#include <regex.h>
#include <typeinfo>
#include "gtest/internal/gtest-tuple.h"
Include dependency graph for gtest-port.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  testing::internal::bool_constant< bool_value >
 
struct  testing::internal::CompileAssert< bool >
 
class  testing::internal::GTestLog
 
class  testing::internal::GTestMutexLock
 
struct  testing::internal::is_pointer< T >
 
struct  testing::internal::is_pointer< T * >
 
struct  testing::internal::IteratorTraits< Iterator >
 
struct  testing::internal::IteratorTraits< const T * >
 
struct  testing::internal::IteratorTraits< T * >
 
class  testing::internal::Mutex
 
class  testing::internal::RE
 
class  testing::internal::scoped_ptr< T >
 
struct  testing::internal::StaticAssertTypeEqHelper< T1, T2 >
 
struct  testing::internal::StaticAssertTypeEqHelper< T, T >
 
class  testing::internal::ThreadLocal< T >
 
class  testing::internal::TypeWithSize< size >
 
class  testing::internal::TypeWithSize< 4 >
 
class  testing::internal::TypeWithSize< 8 >
 

Namespaces

 testing
 
 testing::internal
 
 testing::internal::posix
 

Macros

#define GTEST_AMBIGUOUS_ELSE_BLOCKER_   switch (0) case 0: default:
 
#define GTEST_API_
 
#define GTEST_ATTRIBUTE_UNUSED_
 
#define GTEST_CAN_COMPARE_NULL   1
 
#define GTEST_CHECK_(condition)
 
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
 
#define GTEST_COMPILE_ASSERT_(expr, msg)
 
#define GTEST_DECLARE_bool_(name)   GTEST_API_ extern bool GTEST_FLAG(name)
 
#define GTEST_DECLARE_int32_(name)   GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
 
#define GTEST_DECLARE_STATIC_MUTEX_(mutex)   extern ::testing::internal::Mutex mutex
 
#define GTEST_DECLARE_string_(name)   GTEST_API_ extern ::std::string GTEST_FLAG(name)
 
#define GTEST_DEFINE_bool_(name, default_val, doc)   GTEST_API_ bool GTEST_FLAG(name) = (default_val)
 
#define GTEST_DEFINE_int32_(name, default_val, doc)   GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
 
#define GTEST_DEFINE_STATIC_MUTEX_(mutex)   ::testing::internal::Mutex mutex
 
#define GTEST_DEFINE_string_(name, default_val, doc)   GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
 
#define GTEST_DEV_EMAIL_   "googletestframework@@googlegroups.com"
 
#define GTEST_DISALLOW_ASSIGN_(type)   void operator=(type const &)
 
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
 
#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
 
#define GTEST_FLAG(name)   FLAGS_gtest_##name
 
#define GTEST_FLAG_PREFIX_   "gtest_"
 
#define GTEST_FLAG_PREFIX_DASH_   "gtest-"
 
#define GTEST_FLAG_PREFIX_UPPER_   "GTEST_"
 
#define GTEST_HAS_ALT_PATH_SEP_   0
 
#define GTEST_HAS_CLONE   0
 
#define GTEST_HAS_CXXABI_H_   0
 
#define GTEST_HAS_EXCEPTIONS   0
 
#define GTEST_HAS_GLOBAL_STRING   0
 
#define GTEST_HAS_GLOBAL_WSTRING   (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
 
#define GTEST_HAS_PARAM_TEST   1
 
#define GTEST_HAS_POSIX_RE   (!GTEST_OS_WINDOWS)
 
#define GTEST_HAS_PTHREAD
 
#define GTEST_HAS_RTTI   1
 
#define GTEST_HAS_SEH   0
 
#define GTEST_HAS_STD_STRING   1
 
#define GTEST_HAS_STD_WSTRING   (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
 
#define GTEST_HAS_STREAM_REDIRECTION   1
 
#define GTEST_HAS_TR1_TUPLE   1
 
#define GTEST_IS_THREADSAFE   0
 
#define GTEST_LANG_CXX11   0
 
#define GTEST_LOCK_EXCLUDED_(locks)
 
#define GTEST_LOG_(severity)
 
#define GTEST_MUST_USE_RESULT_
 
#define GTEST_NAME_   "Google Test"
 
#define GTEST_NO_INLINE_
 
#define GTEST_PATH_SEP_   "/"
 
#define GTEST_PROJECT_URL_   "http://code.google.com/p/googletest/"
 
#define GTEST_SNPRINTF_   snprintf
 
#define GTEST_USE_OWN_TR1_TUPLE   1
 
#define GTEST_USES_POSIX_RE   1
 
#define GTEST_WIDE_STRING_USES_UTF16_   (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
 

Typedefs

typedef long long testing::internal::BiggestInt
 
typedef bool_constant< false > testing::internal::false_type
 
typedef TypeWithSize< 4 >::Int testing::internal::Int32
 
typedef TypeWithSize< 8 >::Int testing::internal::Int64
 
typedef GTestMutexLock testing::internal::MutexLock
 
typedef struct stat testing::internal::posix::StatStruct
 
typedef ::std::string testing::internal::string
 
typedef TypeWithSize< 8 >::Int testing::internal::TimeInMillis
 
typedef bool_constant< true > testing::internal::true_type
 
typedef TypeWithSize< 4 >::UInt testing::internal::UInt32
 
typedef TypeWithSize< 8 >::UInt testing::internal::UInt64
 
typedef ::std::wstring testing::internal::wstring
 

Enumerations

enum  testing::internal::GTestLogSeverity { testing::internal::GTEST_INFO, testing::internal::GTEST_WARNING, testing::internal::GTEST_ERROR, testing::internal::GTEST_FATAL }
 

Functions

void testing::internal::posix::Abort ()
 
bool testing::internal::BoolFromGTestEnv (const char *flag, bool default_val)
 
GTEST_API_ void testing::internal::CaptureStderr ()
 
GTEST_API_ void testing::internal::CaptureStdout ()
 
int testing::internal::posix::ChDir (const char *dir)
 
template<class Derived , class Base >
Derived * testing::internal::CheckedDowncastToActualType (Base *base)
 
int testing::internal::posix::Close (int fd)
 
template<typename To , typename From >
To testing::internal::DownCast_ (From *f)
 
int testing::internal::posix::FClose (FILE *fp)
 
FILE * testing::internal::posix::FDOpen (int fd, const char *mode)
 
int testing::internal::posix::FileNo (FILE *file)
 
void testing::internal::FlushInfoLog ()
 
FILE * testing::internal::posix::FOpen (const char *path, const char *mode)
 
GTEST_API_ ::std::string testing::internal::FormatCompilerIndependentFileLocation (const char *file, int line)
 
GTEST_API_ ::std::string testing::internal::FormatFileLocation (const char *file, int line)
 
FILE * testing::internal::posix::FReopen (const char *path, const char *mode, FILE *stream)
 
GTEST_API_ std::string testing::internal::GetCapturedStderr ()
 
GTEST_API_ std::string testing::internal::GetCapturedStdout ()
 
const char * testing::internal::posix::GetEnv (const char *name)
 
GTEST_API_ size_t testing::internal::GetThreadCount ()
 
template<typename To >
To testing::internal::ImplicitCast_ (To x)
 
GTEST_API_ Int32 testing::internal::Int32FromGTestEnv (const char *flag, Int32 default_val)
 
bool testing::internal::IsAlNum (char ch)
 
bool testing::internal::IsAlpha (char ch)
 
int testing::internal::posix::IsATTY (int fd)
 
bool testing::internal::IsDigit (char ch)
 
bool testing::internal::posix::IsDir (const StatStruct &st)
 
bool testing::internal::IsLower (char ch)
 
bool testing::internal::IsSpace (char ch)
 
GTEST_API_ bool testing::internal::IsTrue (bool condition)
 
bool testing::internal::IsUpper (char ch)
 
bool testing::internal::IsXDigit (char ch)
 
bool testing::internal::IsXDigit (wchar_t ch)
 
void testing::internal::LogToStderr ()
 
bool testing::internal::ParseInt32 (const Message &src_text, const char *str, Int32 *value)
 
int testing::internal::posix::Read (int fd, void *buf, unsigned int count)
 
int testing::internal::posix::RmDir (const char *dir)
 
int testing::internal::posix::Stat (const char *path, StatStruct *buf)
 
int testing::internal::posix::StrCaseCmp (const char *s1, const char *s2)
 
char * testing::internal::posix::StrDup (const char *src)
 
const char * testing::internal::posix::StrError (int errnum)
 
const char * testing::internal::StringFromGTestEnv (const char *flag, const char *default_val)
 
const char * testing::internal::posix::StrNCpy (char *dest, const char *src, size_t n)
 
char testing::internal::ToLower (char ch)
 
char testing::internal::ToUpper (char ch)
 
int testing::internal::posix::Write (int fd, const void *buf, unsigned int count)
 

Variables

const BiggestInt testing::internal::kMaxBiggestInt
 

Macro Definition Documentation

◆ GTEST_AMBIGUOUS_ELSE_BLOCKER_

#define GTEST_AMBIGUOUS_ELSE_BLOCKER_   switch (0) case 0: default:

Definition at line 702 of file gtest-port.h.

◆ GTEST_API_

#define GTEST_API_

Definition at line 771 of file gtest-port.h.

◆ GTEST_ATTRIBUTE_UNUSED_

#define GTEST_ATTRIBUTE_UNUSED_

Definition at line 719 of file gtest-port.h.

◆ GTEST_CAN_COMPARE_NULL

#define GTEST_CAN_COMPARE_NULL   1

Definition at line 1602 of file gtest-port.h.

◆ GTEST_CHECK_

#define GTEST_CHECK_ (   condition)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::IsTrue(condition)) \
; \
GTEST_LOG_(FATAL) << "Condition " #condition " failed. "

Definition at line 1063 of file gtest-port.h.

◆ GTEST_CHECK_POSIX_SUCCESS_

#define GTEST_CHECK_POSIX_SUCCESS_ (   posix_call)
Value:
if (const int gtest_error = (posix_call)) \
GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
<< gtest_error

Definition at line 1075 of file gtest-port.h.

◆ GTEST_COMPILE_ASSERT_

#define GTEST_COMPILE_ASSERT_ (   expr,
  msg 
)
Value:
typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_

Definition at line 818 of file gtest-port.h.

◆ GTEST_DECLARE_bool_

#define GTEST_DECLARE_bool_ (   name)    GTEST_API_ extern bool GTEST_FLAG(name)

Definition at line 1915 of file gtest-port.h.

◆ GTEST_DECLARE_int32_

#define GTEST_DECLARE_int32_ (   name)    GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)

Definition at line 1916 of file gtest-port.h.

◆ GTEST_DECLARE_STATIC_MUTEX_

#define GTEST_DECLARE_STATIC_MUTEX_ (   mutex)    extern ::testing::internal::Mutex mutex

Definition at line 1556 of file gtest-port.h.

◆ GTEST_DECLARE_string_

#define GTEST_DECLARE_string_ (   name)    GTEST_API_ extern ::std::string GTEST_FLAG(name)

Definition at line 1918 of file gtest-port.h.

◆ GTEST_DEFINE_bool_

#define GTEST_DEFINE_bool_ (   name,
  default_val,
  doc 
)    GTEST_API_ bool GTEST_FLAG(name) = (default_val)

Definition at line 1922 of file gtest-port.h.

◆ GTEST_DEFINE_int32_

#define GTEST_DEFINE_int32_ (   name,
  default_val,
  doc 
)    GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)

Definition at line 1924 of file gtest-port.h.

◆ GTEST_DEFINE_STATIC_MUTEX_

#define GTEST_DEFINE_STATIC_MUTEX_ (   mutex)    ::testing::internal::Mutex mutex

Definition at line 1559 of file gtest-port.h.

◆ GTEST_DEFINE_string_

#define GTEST_DEFINE_string_ (   name,
  default_val,
  doc 
)    GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)

Definition at line 1926 of file gtest-port.h.

◆ GTEST_DEV_EMAIL_

#define GTEST_DEV_EMAIL_   "googletestframework@@googlegroups.com"

Definition at line 218 of file gtest-port.h.

◆ GTEST_DISALLOW_ASSIGN_

#define GTEST_DISALLOW_ASSIGN_ (   type)    void operator=(type const &)

Definition at line 724 of file gtest-port.h.

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_

#define GTEST_DISALLOW_COPY_AND_ASSIGN_ (   type)
Value:
type(type const &);\
GTEST_DISALLOW_ASSIGN_(type)

Definition at line 729 of file gtest-port.h.

◆ GTEST_EXCLUSIVE_LOCK_REQUIRED_

#define GTEST_EXCLUSIVE_LOCK_REQUIRED_ (   locks)

Definition at line 1930 of file gtest-port.h.

◆ GTEST_FLAG

#define GTEST_FLAG (   name)    FLAGS_gtest_##name

Definition at line 1912 of file gtest-port.h.

◆ GTEST_FLAG_PREFIX_

#define GTEST_FLAG_PREFIX_   "gtest_"

Definition at line 219 of file gtest-port.h.

◆ GTEST_FLAG_PREFIX_DASH_

#define GTEST_FLAG_PREFIX_DASH_   "gtest-"

Definition at line 220 of file gtest-port.h.

◆ GTEST_FLAG_PREFIX_UPPER_

#define GTEST_FLAG_PREFIX_UPPER_   "GTEST_"

Definition at line 221 of file gtest-port.h.

◆ GTEST_HAS_ALT_PATH_SEP_

#define GTEST_HAS_ALT_PATH_SEP_   0

Definition at line 1651 of file gtest-port.h.

◆ GTEST_HAS_CLONE

#define GTEST_HAS_CLONE   0

Definition at line 627 of file gtest-port.h.

◆ GTEST_HAS_CXXABI_H_

#define GTEST_HAS_CXXABI_H_   0

Definition at line 785 of file gtest-port.h.

◆ GTEST_HAS_EXCEPTIONS

#define GTEST_HAS_EXCEPTIONS   0

Definition at line 370 of file gtest-port.h.

◆ GTEST_HAS_GLOBAL_STRING

#define GTEST_HAS_GLOBAL_STRING   0

Definition at line 387 of file gtest-port.h.

◆ GTEST_HAS_GLOBAL_WSTRING

#define GTEST_HAS_GLOBAL_WSTRING   (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)

Definition at line 408 of file gtest-port.h.

◆ GTEST_HAS_PARAM_TEST

#define GTEST_HAS_PARAM_TEST   1

Definition at line 660 of file gtest-port.h.

◆ GTEST_HAS_POSIX_RE

#define GTEST_HAS_POSIX_RE   (!GTEST_OS_WINDOWS)

Definition at line 313 of file gtest-port.h.

◆ GTEST_HAS_PTHREAD

#define GTEST_HAS_PTHREAD
Value:
(GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
|| GTEST_OS_QNX)

Definition at line 482 of file gtest-port.h.

◆ GTEST_HAS_RTTI

#define GTEST_HAS_RTTI   1

Definition at line 463 of file gtest-port.h.

◆ GTEST_HAS_SEH

#define GTEST_HAS_SEH   0

Definition at line 755 of file gtest-port.h.

◆ GTEST_HAS_STD_STRING

#define GTEST_HAS_STD_STRING   1

Definition at line 377 of file gtest-port.h.

◆ GTEST_HAS_STD_WSTRING

#define GTEST_HAS_STD_WSTRING   (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))

Definition at line 400 of file gtest-port.h.

◆ GTEST_HAS_STREAM_REDIRECTION

#define GTEST_HAS_STREAM_REDIRECTION   1

Definition at line 640 of file gtest-port.h.

◆ GTEST_HAS_TR1_TUPLE

#define GTEST_HAS_TR1_TUPLE   1

Definition at line 504 of file gtest-port.h.

◆ GTEST_IS_THREADSAFE

#define GTEST_IS_THREADSAFE   0

Definition at line 1583 of file gtest-port.h.

◆ GTEST_LANG_CXX11

#define GTEST_LANG_CXX11   0

Definition at line 284 of file gtest-port.h.

◆ GTEST_LOCK_EXCLUDED_

#define GTEST_LOCK_EXCLUDED_ (   locks)

Definition at line 1931 of file gtest-port.h.

◆ GTEST_LOG_

#define GTEST_LOG_ (   severity)
Value:
::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
__FILE__, __LINE__).GetStream()

Definition at line 1042 of file gtest-port.h.

◆ GTEST_MUST_USE_RESULT_

#define GTEST_MUST_USE_RESULT_

Definition at line 741 of file gtest-port.h.

◆ GTEST_NAME_

#define GTEST_NAME_   "Google Test"

Definition at line 222 of file gtest-port.h.

◆ GTEST_NO_INLINE_

#define GTEST_NO_INLINE_

Definition at line 778 of file gtest-port.h.

◆ GTEST_PATH_SEP_

#define GTEST_PATH_SEP_   "/"

Definition at line 1650 of file gtest-port.h.

◆ GTEST_PROJECT_URL_

#define GTEST_PROJECT_URL_   "http://code.google.com/p/googletest/"

Definition at line 223 of file gtest-port.h.

◆ GTEST_SNPRINTF_

#define GTEST_SNPRINTF_   snprintf

Definition at line 1838 of file gtest-port.h.

◆ GTEST_USE_OWN_TR1_TUPLE

#define GTEST_USE_OWN_TR1_TUPLE   1

Definition at line 538 of file gtest-port.h.

◆ GTEST_USES_POSIX_RE

#define GTEST_USES_POSIX_RE   1

Definition at line 325 of file gtest-port.h.

◆ GTEST_WIDE_STRING_USES_UTF16_

#define GTEST_WIDE_STRING_USES_UTF16_   (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)

Definition at line 681 of file gtest-port.h.

GTEST_LOG_
#define GTEST_LOG_(severity)
Definition: gtest-port.h:1042
testing::internal::IsTrue
GTEST_API_ bool IsTrue(bool condition)
Definition: gtest.cc:4651
testing::internal::GTestLog::GetStream
::std::ostream & GetStream()
Definition: gtest-port.h:1034
GTEST_ATTRIBUTE_UNUSED_
#define GTEST_ATTRIBUTE_UNUSED_
Definition: gtest-port.h:719
testing::internal::GTestLog
Definition: gtest-port.h:1027


fcl
Author(s):
autogenerated on Wed Feb 17 2021 03:40:09