GrPPI  1.0
Generic and Reusable Parallel Pattern Interface
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h File Reference
#include <ctype.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cerrno>
#include <cstdint>
#include <limits>
#include <type_traits>
#include <sys/types.h>
#include <sys/stat.h>
#include <iostream>
#include <locale>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "gtest/internal/custom/gtest-port.h"
#include "gtest/internal/gtest-port-arch.h"
#include <unistd.h>
#include <strings.h>
#include <regex.h>
#include <typeinfo>
Include dependency graph for cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:

Go to the source code of this file.

Classes

class  testing::internal::RE
 
class  testing::internal::GTestLog
 
struct  testing::internal::ConstRef< T >
 
struct  testing::internal::ConstRef< T & >
 
class  testing::internal::Mutex
 
class  testing::internal::GTestMutexLock
 
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_DEV_EMAIL_   "googletestframework@@googlegroups.com"
 
#define GTEST_FLAG_PREFIX_   "gtest_"
 
#define GTEST_FLAG_PREFIX_DASH_   "gtest-"
 
#define GTEST_FLAG_PREFIX_UPPER_   "GTEST_"
 
#define GTEST_NAME_   "Google Test"
 
#define GTEST_PROJECT_URL_   "https://github.com/google/googletest/"
 
#define GTEST_INIT_GOOGLE_TEST_NAME_   "testing::InitGoogleTest"
 
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
 
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
 
#define GTEST_DISABLE_MSC_DEPRECATED_PUSH_()    GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
 
#define GTEST_DISABLE_MSC_DEPRECATED_POP_()    GTEST_DISABLE_MSC_WARNINGS_POP_()
 
#define GTEST_HAS_POSIX_RE   (!GTEST_OS_WINDOWS)
 
#define GTEST_USES_POSIX_RE   1
 
#define GTEST_HAS_EXCEPTIONS   0
 
#define GTEST_HAS_STD_WSTRING
 
#define GTEST_HAS_RTTI   1
 
#define GTEST_HAS_PTHREAD
 
#define GTEST_HAS_CLONE   0
 
#define GTEST_HAS_STREAM_REDIRECTION   1
 
#define GTEST_WIDE_STRING_USES_UTF16_    (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2)
 
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_   switch (0) case 0: default:
 
#define GTEST_ATTRIBUTE_UNUSED_
 
#define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)
 
#define GTEST_DISALLOW_ASSIGN_(type)    type& operator=(type const &) = delete
 
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
 
#define GTEST_DISALLOW_MOVE_ASSIGN_(type)    type& operator=(type &&) noexcept = delete
 
#define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type)
 
#define GTEST_MUST_USE_RESULT_
 
#define GTEST_INTENTIONAL_CONST_COND_PUSH_()    GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127)
 
#define GTEST_INTENTIONAL_CONST_COND_POP_()    GTEST_DISABLE_MSC_WARNINGS_POP_()
 
#define GTEST_HAS_SEH   0
 
#define GTEST_IS_THREADSAFE
 
#define GTEST_API_
 
#define GTEST_DEFAULT_DEATH_TEST_STYLE   "fast"
 
#define GTEST_NO_INLINE_
 
#define GTEST_HAS_CXXABI_H_   0
 
#define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
 
#define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
 
#define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
 
#define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
 
#define GTEST_COMPILE_ASSERT_(expr, msg)   static_assert(expr, #msg)
 
#define GTEST_LOG_(severity)
 
#define GTEST_CHECK_(condition)
 
#define GTEST_CHECK_POSIX_SUCCESS_(posix_call)
 
#define GTEST_REFERENCE_TO_CONST_(T)    typename ::testing::internal::ConstRef<T>::type
 
#define GTEST_DECLARE_STATIC_MUTEX_(mutex)    extern ::testing::internal::Mutex mutex
 
#define GTEST_DEFINE_STATIC_MUTEX_(mutex)   ::testing::internal::Mutex mutex
 
#define GTEST_PATH_SEP_   "/"
 
#define GTEST_HAS_ALT_PATH_SEP_   0
 
#define GTEST_SNPRINTF_   snprintf
 
#define GTEST_FLAG(name)   FLAGS_gtest_##name
 
#define GTEST_USE_OWN_FLAGFILE_FLAG_   1
 
#define GTEST_FLAG_SAVER_   ::testing::internal::GTestFlagSaver
 
#define GTEST_DECLARE_bool_(name)   GTEST_API_ extern bool GTEST_FLAG(name)
 
#define GTEST_DECLARE_int32_(name)    GTEST_API_ extern std::int32_t GTEST_FLAG(name)
 
#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_ std::int32_t GTEST_FLAG(name) = (default_val)
 
#define GTEST_DEFINE_string_(name, default_val, doc)    GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
 
#define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
 
#define GTEST_LOCK_EXCLUDED_(locks)
 
#define GTEST_INTERNAL_DEPRECATED(message)
 

Typedefs

typedef GTestMutexLock testing::internal::MutexLock
 
typedef struct stat testing::internal::posix::StatStruct
 
using testing::internal::BiggestInt = long long
 
using testing::internal::TimeInMillis = int64_t
 

Enumerations

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

Functions

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

Variables

constexpr BiggestInt testing::internal::kMaxBiggestInt = (std::numeric_limits<BiggestInt>::max)()
 

Macro Definition Documentation

◆ GTEST_AMBIGUOUS_ELSE_BLOCKER_

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

◆ GTEST_API_

#define GTEST_API_

◆ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_

#define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_

◆ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_

#define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_

◆ GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_

#define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_

◆ GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_

#define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_

◆ GTEST_ATTRIBUTE_PRINTF_

#define GTEST_ATTRIBUTE_PRINTF_ (   string_index,
  first_to_check 
)

◆ GTEST_ATTRIBUTE_UNUSED_

#define GTEST_ATTRIBUTE_UNUSED_

◆ GTEST_CHECK_

#define GTEST_CHECK_ (   condition)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::IsTrue(condition)) \
; \
GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
#define GTEST_LOG_(severity)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:980
GTEST_API_ bool IsTrue(bool condition)

◆ 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

◆ GTEST_COMPILE_ASSERT_

#define GTEST_COMPILE_ASSERT_ (   expr,
  msg 
)    static_assert(expr, #msg)

◆ GTEST_DECLARE_bool_

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

◆ GTEST_DECLARE_int32_

#define GTEST_DECLARE_int32_ (   name)     GTEST_API_ extern std::int32_t GTEST_FLAG(name)

◆ GTEST_DECLARE_STATIC_MUTEX_

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

◆ GTEST_DECLARE_string_

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

◆ GTEST_DEFAULT_DEATH_TEST_STYLE

#define GTEST_DEFAULT_DEATH_TEST_STYLE   "fast"

◆ GTEST_DEFINE_bool_

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

◆ GTEST_DEFINE_int32_

#define GTEST_DEFINE_int32_ (   name,
  default_val,
  doc 
)     GTEST_API_ std::int32_t GTEST_FLAG(name) = (default_val)

◆ GTEST_DEFINE_STATIC_MUTEX_

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

◆ GTEST_DEFINE_string_

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

◆ GTEST_DEV_EMAIL_

#define GTEST_DEV_EMAIL_   "googletestframework@@googlegroups.com"

◆ GTEST_DISABLE_MSC_DEPRECATED_POP_

#define GTEST_DISABLE_MSC_DEPRECATED_POP_ ( )     GTEST_DISABLE_MSC_WARNINGS_POP_()

◆ GTEST_DISABLE_MSC_DEPRECATED_PUSH_

#define GTEST_DISABLE_MSC_DEPRECATED_PUSH_ ( )     GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)

◆ GTEST_DISABLE_MSC_WARNINGS_POP_

#define GTEST_DISABLE_MSC_WARNINGS_POP_ ( )

◆ GTEST_DISABLE_MSC_WARNINGS_PUSH_

#define GTEST_DISABLE_MSC_WARNINGS_PUSH_ (   warnings)

◆ GTEST_DISALLOW_ASSIGN_

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

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_

#define GTEST_DISALLOW_COPY_AND_ASSIGN_ (   type)
Value:
type(type const&) = delete; \
type& operator=(type const&) = delete

◆ GTEST_DISALLOW_MOVE_AND_ASSIGN_

#define GTEST_DISALLOW_MOVE_AND_ASSIGN_ (   type)
Value:
type(type&&) noexcept = delete; \
type& operator=(type&&) noexcept = delete

◆ GTEST_DISALLOW_MOVE_ASSIGN_

#define GTEST_DISALLOW_MOVE_ASSIGN_ (   type)     type& operator=(type &&) noexcept = delete

◆ GTEST_EXCLUSIVE_LOCK_REQUIRED_

#define GTEST_EXCLUSIVE_LOCK_REQUIRED_ (   locks)

◆ GTEST_FLAG

#define GTEST_FLAG (   name)    FLAGS_gtest_##name

◆ GTEST_FLAG_PREFIX_

#define GTEST_FLAG_PREFIX_   "gtest_"

◆ GTEST_FLAG_PREFIX_DASH_

#define GTEST_FLAG_PREFIX_DASH_   "gtest-"

◆ GTEST_FLAG_PREFIX_UPPER_

#define GTEST_FLAG_PREFIX_UPPER_   "GTEST_"

◆ GTEST_FLAG_SAVER_

#define GTEST_FLAG_SAVER_   ::testing::internal::GTestFlagSaver

◆ GTEST_HAS_ALT_PATH_SEP_

#define GTEST_HAS_ALT_PATH_SEP_   0

◆ GTEST_HAS_CLONE

#define GTEST_HAS_CLONE   0

◆ GTEST_HAS_CXXABI_H_

#define GTEST_HAS_CXXABI_H_   0

◆ GTEST_HAS_EXCEPTIONS

#define GTEST_HAS_EXCEPTIONS   0

◆ GTEST_HAS_POSIX_RE

#define GTEST_HAS_POSIX_RE   (!GTEST_OS_WINDOWS)

◆ GTEST_HAS_PTHREAD

#define GTEST_HAS_PTHREAD
Value:
(GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX || \
GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \
GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_OPENBSD || \
GTEST_OS_HAIKU)

◆ GTEST_HAS_RTTI

#define GTEST_HAS_RTTI   1

◆ GTEST_HAS_SEH

#define GTEST_HAS_SEH   0

◆ GTEST_HAS_STD_WSTRING

#define GTEST_HAS_STD_WSTRING
Value:
(!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
GTEST_OS_HAIKU || GTEST_OS_ESP32 || GTEST_OS_ESP8266))

◆ GTEST_HAS_STREAM_REDIRECTION

#define GTEST_HAS_STREAM_REDIRECTION   1

◆ GTEST_INIT_GOOGLE_TEST_NAME_

#define GTEST_INIT_GOOGLE_TEST_NAME_   "testing::InitGoogleTest"

◆ GTEST_INTENTIONAL_CONST_COND_POP_

#define GTEST_INTENTIONAL_CONST_COND_POP_ ( )     GTEST_DISABLE_MSC_WARNINGS_POP_()

◆ GTEST_INTENTIONAL_CONST_COND_PUSH_

#define GTEST_INTENTIONAL_CONST_COND_PUSH_ ( )     GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127)

◆ GTEST_INTERNAL_DEPRECATED

#define GTEST_INTERNAL_DEPRECATED (   message)

◆ GTEST_IS_THREADSAFE

#define GTEST_IS_THREADSAFE
Value:
(GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ || \
(GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \
#define GTEST_HAS_PTHREAD
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:542

◆ GTEST_LOCK_EXCLUDED_

#define GTEST_LOCK_EXCLUDED_ (   locks)

◆ GTEST_LOG_

#define GTEST_LOG_ (   severity)
Value:
::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
__FILE__, __LINE__).GetStream()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:963
::std::ostream & GetStream()
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-port.h:970

◆ GTEST_MUST_USE_RESULT_

#define GTEST_MUST_USE_RESULT_

◆ GTEST_NAME_

#define GTEST_NAME_   "Google Test"

◆ GTEST_NO_INLINE_

#define GTEST_NO_INLINE_

◆ GTEST_PATH_SEP_

#define GTEST_PATH_SEP_   "/"

◆ GTEST_PROJECT_URL_

#define GTEST_PROJECT_URL_   "https://github.com/google/googletest/"

◆ GTEST_REFERENCE_TO_CONST_

#define GTEST_REFERENCE_TO_CONST_ (   T)     typename ::testing::internal::ConstRef<T>::type

◆ GTEST_SNPRINTF_

#define GTEST_SNPRINTF_   snprintf

◆ GTEST_USE_OWN_FLAGFILE_FLAG_

#define GTEST_USE_OWN_FLAGFILE_FLAG_   1

◆ GTEST_USES_POSIX_RE

#define GTEST_USES_POSIX_RE   1

◆ GTEST_WIDE_STRING_USES_UTF16_

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