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-internal.h File Reference
#include "gtest/internal/gtest-port.h"
#include <ctype.h>
#include <float.h>
#include <string.h>
#include <cstdint>
#include <iomanip>
#include <limits>
#include <map>
#include <set>
#include <string>
#include <type_traits>
#include <vector>
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-filepath.h"
#include "gtest/internal/gtest-string.h"
#include "gtest/internal/gtest-type-util.h"
Include dependency graph for cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-internal.h:

Go to the source code of this file.

Classes

class  testing::internal::IgnoredValue
 
class  testing::internal::FloatingPoint< RawType >
 
class  testing::internal::TypeIdHelper< T >
 
class  testing::internal::TestFactoryBase
 
class  testing::internal::TestFactoryImpl< TestClass >
 
struct  testing::internal::CodeLocation
 
struct  testing::internal::SuiteApiResolver< T >
 
struct  testing::internal::DefaultNameGenerator
 
struct  testing::internal::NameGeneratorSelector< Provided >
 
class  testing::internal::TypeParameterizedTest< Fixture, TestSel, Types >
 
class  testing::internal::TypeParameterizedTest< Fixture, TestSel, internal::None >
 
class  testing::internal::TypeParameterizedTestSuite< Fixture, Tests, Types >
 
class  testing::internal::TypeParameterizedTestSuite< Fixture, internal::None, Types >
 
struct  testing::internal::ConstCharPtr
 
struct  testing::internal::TrueWithString
 
class  testing::internal::Random
 
class  testing::internal::HasDebugStringAndShortDebugString< T >
 
struct  testing::internal::IsHashTable< T >
 
struct  testing::internal::IsRecursiveContainerImpl< C, false >
 
struct  testing::internal::IsRecursiveContainerImpl< C, true >
 
struct  testing::internal::IsRecursiveContainer< C >
 
struct  testing::internal::RelationToSourceReference
 
struct  testing::internal::RelationToSourceCopy
 
class  testing::internal::NativeArray< Element >
 
struct  testing::internal::IndexSequence< Is >
 
struct  testing::internal::DoubleSequence< true, IndexSequence< I... >, sizeofT >
 
struct  testing::internal::DoubleSequence< false, IndexSequence< I... >, sizeofT >
 
struct  testing::internal::MakeIndexSequenceImpl< N >
 
struct  testing::internal::MakeIndexSequenceImpl< 0 >
 
struct  testing::internal::Ignore< size_t >
 
struct  testing::internal::ElemFromListImpl< IndexSequence< I... > >
 
struct  testing::internal::ElemFromList< N, T >
 
struct  testing::internal::FlatTupleConstructTag
 
struct  testing::internal::FlatTupleElemBase< FlatTuple< T... >, I >
 
struct  testing::internal::FlatTupleBase< FlatTuple< T... >, IndexSequence< Idx... > >
 
class  testing::internal::FlatTuple< T >
 
struct  std::tuple_size< testing::internal::FlatTuple< Ts... > >
 

Namespaces

 proto2
 
 testing
 
 testing::internal
 
 testing::internal::edit_distance
 

Macros

#define GTEST_CONCAT_TOKEN_(foo, bar)   GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
 
#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar)   foo ## bar
 
#define GTEST_STRINGIFY_HELPER_(name, ...)   #name
 
#define GTEST_STRINGIFY_(...)   GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )
 
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T)    typename std::remove_const<typename std::remove_reference<T>::type>::type
 
#define GTEST_MESSAGE_AT_(file, line, message, result_type)
 
#define GTEST_MESSAGE_(message, result_type)    GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
 
#define GTEST_FATAL_FAILURE_(message)    return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
 
#define GTEST_NONFATAL_FAILURE_(message)    GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
 
#define GTEST_SUCCESS_(message)    GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
 
#define GTEST_SKIP_(message)    return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip)
 
#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
 
#define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)
 
#define GTEST_TEST_THROW_(statement, expected_exception, fail)
 
#define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()
 
#define GTEST_TEST_NO_THROW_(statement, fail)
 
#define GTEST_TEST_ANY_THROW_(statement, fail)
 
#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail)
 
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail)
 
#define GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)    test_suite_name##_##test_name##_Test
 
#define GTEST_TEST_(test_suite_name, test_name, parent_class, parent_id)
 

Typedefs

typedef FloatingPoint< float > testing::internal::Float
 
typedef FloatingPoint< double > testing::internal::Double
 
typedef const void * testing::internal::TypeId
 
using testing::internal::SetUpTestSuiteFunc = void(*)()
 
using testing::internal::TearDownTestSuiteFunc = void(*)()
 
using testing::internal::SetUpTearDownSuiteFuncType = void(*)()
 
using testing::internal::TypedTestCasePState = TypedTestSuitePState
 
typedef int testing::internal::IsContainer
 
typedef char testing::internal::IsNotContainer
 
template<size_t N>
using testing::internal::MakeIndexSequence = typename MakeIndexSequenceImpl< N >::type
 
template<typename... T>
using testing::internal::IndexSequenceFor = typename MakeIndexSequence< sizeof...(T)>::type
 

Enumerations

enum  testing::internal::edit_distance::EditType {
  testing::internal::edit_distance::kMatch , testing::internal::edit_distance::kAdd , testing::internal::edit_distance::kRemove , testing::internal::edit_distance::kReplace ,
  testing::internal::edit_distance::kMatch , testing::internal::edit_distance::kAdd , testing::internal::edit_distance::kRemove , testing::internal::edit_distance::kReplace
}
 

Functions

template<typename T >
::std::string testing::PrintToString (const T &value)
 
GTEST_API_ std::string testing::internal::AppendUserMessage (const std::string &gtest_msg, const Message &user_msg)
 
GTEST_API_ std::vector< EditType > testing::internal::edit_distance::CalculateOptimalEdits (const std::vector< size_t > &left, const std::vector< size_t > &right)
 
GTEST_API_ std::vector< EditType > testing::internal::edit_distance::CalculateOptimalEdits (const std::vector< std::string > &left, const std::vector< std::string > &right)
 
GTEST_API_ std::string testing::internal::edit_distance::CreateUnifiedDiff (const std::vector< std::string > &left, const std::vector< std::string > &right, size_t context=2)
 
GTEST_API_ std::string testing::internal::DiffStrings (const std::string &left, const std::string &right, size_t *total_line_count)
 
GTEST_API_ AssertionResult testing::internal::EqFailure (const char *expected_expression, const char *actual_expression, const std::string &expected_value, const std::string &actual_value, bool ignoring_case)
 
GTEST_API_ std::string testing::internal::GetBoolAssertionFailureMessage (const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)
 
template<typename T >
TypeId testing::internal::GetTypeId ()
 
GTEST_API_ TypeId testing::internal::GetTestTypeId ()
 
SetUpTearDownSuiteFuncType testing::internal::GetNotDefaultOrNull (SetUpTearDownSuiteFuncType a, SetUpTearDownSuiteFuncType def)
 
GTEST_API_ TestInfo * testing::internal::MakeAndRegisterTestInfo (const char *test_suite_name, const char *name, const char *type_param, const char *value_param, CodeLocation code_location, TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc, TearDownTestSuiteFunc tear_down_tc, TestFactoryBase *factory)
 
GTEST_API_ bool testing::internal::SkipPrefix (const char *prefix, const char **pstr)
 
 testing::internal::GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) class GTEST_API_ TypedTestSuitePState
 
 testing::internal::GTEST_DISABLE_MSC_WARNINGS_POP_ () inline const char *SkipComma(const char *str)
 
std::string testing::internal::GetPrefixUntilComma (const char *str)
 
void testing::internal::SplitString (const ::std::string &str, char delimiter, ::std::vector< ::std::string > *dest)
 
template<typename NameGenerator >
void testing::internal::GenerateNamesRecursively (internal::None, std::vector< std::string > *, int)
 
template<typename NameGenerator , typename Types >
void testing::internal::GenerateNamesRecursively (Types, std::vector< std::string > *result, int i)
 
template<typename NameGenerator , typename Types >
std::vector< std::string > testing::internal::GenerateNames ()
 
GTEST_API_ void testing::internal::RegisterTypeParameterizedTestSuite (const char *test_suite_name, CodeLocation code_location)
 
GTEST_API_ void testing::internal::RegisterTypeParameterizedTestSuiteInstantiation (const char *case_name)
 
GTEST_API_ std::string testing::internal::GetCurrentOsStackTraceExceptTop (UnitTest *unit_test, int skip_count)
 
GTEST_API_ bool testing::internal::AlwaysTrue ()
 
bool testing::internal::AlwaysFalse ()
 
template<class C , class Iterator = decltype(::std::declval<const C&>().begin()), class = decltype(::std::declval<const C&>().end()), class = decltype(++::std::declval<Iterator&>()), class = decltype(*::std::declval<Iterator>()), class = typename C::const_iterator>
IsContainer testing::internal::IsContainerTest (int)
 
template<class C >
IsNotContainer testing::internal::IsContainerTest (long)
 
template<typename T , typename U >
bool testing::internal::ArrayEq (const T *lhs, size_t size, const U *rhs)
 
template<typename T , typename U >
bool testing::internal::ArrayEq (const T &lhs, const U &rhs)
 
template<typename T , typename U , size_t N>
bool testing::internal::ArrayEq (const T(&lhs)[N], const U(&rhs)[N])
 
template<typename Iter , typename Element >
Iter testing::internal::ArrayAwareFind (Iter begin, Iter end, const Element &elem)
 
template<typename T , typename U >
void testing::internal::CopyArray (const T *from, size_t size, U *to)
 
template<typename T , typename U >
void testing::internal::CopyArray (const T &from, U *to)
 
template<typename T , typename U , size_t N>
void testing::internal::CopyArray (const T(&from)[N], U(*to)[N])
 
 testing::internal::GTEST_INTERNAL_DEPRECATED ("INSTANTIATE_TEST_CASE_P is deprecated, please use " "INSTANTIATE_TEST_SUITE_P") const expr bool InstantiateTestCase_P_IsDeprecated()
 
 testing::internal::GTEST_INTERNAL_DEPRECATED ("TYPED_TEST_CASE_P is deprecated, please use " "TYPED_TEST_SUITE_P") const expr bool TypedTestCase_P_IsDeprecated()
 
 testing::internal::GTEST_INTERNAL_DEPRECATED ("TYPED_TEST_CASE is deprecated, please use " "TYPED_TEST_SUITE") const expr bool TypedTestCaseIsDeprecated()
 
 testing::internal::GTEST_INTERNAL_DEPRECATED ("REGISTER_TYPED_TEST_CASE_P is deprecated, please use " "REGISTER_TYPED_TEST_SUITE_P") const expr bool RegisterTypedTestCase_P_IsDeprecated()
 
 testing::internal::GTEST_INTERNAL_DEPRECATED ("INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use " "INSTANTIATE_TYPED_TEST_SUITE_P") const expr bool InstantiateTypedTestCase_P_IsDeprecated()
 

Variables

GTEST_API_ const char testing::internal::kStackTraceMarker []
 

Macro Definition Documentation

◆ GTEST_CONCAT_TOKEN_

#define GTEST_CONCAT_TOKEN_ (   foo,
  bar 
)    GTEST_CONCAT_TOKEN_IMPL_(foo, bar)

◆ GTEST_CONCAT_TOKEN_IMPL_

#define GTEST_CONCAT_TOKEN_IMPL_ (   foo,
  bar 
)    foo ## bar

◆ GTEST_FATAL_FAILURE_

#define GTEST_FATAL_FAILURE_ (   message)     return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)

◆ GTEST_MESSAGE_

#define GTEST_MESSAGE_ (   message,
  result_type 
)     GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)

◆ GTEST_MESSAGE_AT_

#define GTEST_MESSAGE_AT_ (   file,
  line,
  message,
  result_type 
)
Value:
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/gtest-message.h:91
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/gtest.h:1770
typename std::result_of< Transformer(Input)>::type result_type
Determines the return type of applying a function on a input type.
Definition: patterns.h:105

◆ GTEST_NONFATAL_FAILURE_

#define GTEST_NONFATAL_FAILURE_ (   message)     GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)

◆ GTEST_REMOVE_REFERENCE_AND_CONST_

#define GTEST_REMOVE_REFERENCE_AND_CONST_ (   T)     typename std::remove_const<typename std::remove_reference<T>::type>::type

◆ GTEST_SKIP_

#define GTEST_SKIP_ (   message)     return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip)

◆ GTEST_STRINGIFY_

#define GTEST_STRINGIFY_ (   ...)    GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )

◆ GTEST_STRINGIFY_HELPER_

#define GTEST_STRINGIFY_HELPER_ (   name,
  ... 
)    #name

◆ GTEST_SUCCESS_

#define GTEST_SUCCESS_ (   message)     GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)

◆ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_

#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ (   statement)
Value:
statement; \
} else /* NOLINT */ \
static_assert(true, "")
GTEST_API_ bool AlwaysTrue()

◆ GTEST_TEST_

#define GTEST_TEST_ (   test_suite_name,
  test_name,
  parent_class,
  parent_id 
)

◆ GTEST_TEST_ANY_THROW_

#define GTEST_TEST_ANY_THROW_ (   statement,
  fail 
)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
bool gtest_caught_any = false; \
try { \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} \
catch (...) { \
gtest_caught_any = true; \
} \
if (!gtest_caught_any) { \
goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
} \
GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
fail("Expected: " #statement " throws an exception.\n" \
" Actual: it doesn't.")
#define GTEST_CONCAT_TOKEN_(foo, bar)
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-internal.h:78

◆ GTEST_TEST_BOOLEAN_

#define GTEST_TEST_BOOLEAN_ (   expression,
  text,
  actual,
  expected,
  fail 
)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (const ::testing::AssertionResult gtest_ar_ = \
::testing::AssertionResult(expression)) \
; \
else \
gtest_ar_, text, #actual, #expected).c_str())
GTEST_API_ std::string GetBoolAssertionFailureMessage(const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)

◆ GTEST_TEST_CLASS_NAME_

#define GTEST_TEST_CLASS_NAME_ (   test_suite_name,
  test_name 
)     test_suite_name##_##test_name##_Test

◆ GTEST_TEST_NO_FATAL_FAILURE_

#define GTEST_TEST_NO_FATAL_FAILURE_ (   statement,
  fail 
)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
} \
GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
fail("Expected: " #statement " doesn't generate new fatal " \
"failures in the current thread.\n" \
" Actual: it does.")

◆ GTEST_TEST_NO_THROW_

#define GTEST_TEST_NO_THROW_ (   statement,
  fail 
)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::TrueWithString gtest_msg{}) { \
try { \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} \
GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_() \
catch (...) { \
gtest_msg.value = "it throws."; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
} \
GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
fail(("Expected: " #statement " doesn't throw an exception.\n" \
" Actual: " + gtest_msg.value).c_str())
Definition: cmake-build-debug/googletest-src/googletest/include/gtest/internal/gtest-internal.h:857

◆ GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_

#define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_ ( )

◆ GTEST_TEST_THROW_

#define GTEST_TEST_THROW_ (   statement,
  expected_exception,
  fail 
)
Value:
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::TrueWithString gtest_msg{}) { \
bool gtest_caught_expected = false; \
try { \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} catch (expected_exception const&) { \
gtest_caught_expected = true; \
} \
GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception) \
catch (...) { \
gtest_msg.value = "Expected: " #statement \
" throws an exception of type " #expected_exception \
".\n Actual: it throws a different type."; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
} \
if (!gtest_caught_expected) { \
gtest_msg.value = "Expected: " #statement \
" throws an exception of type " #expected_exception \
".\n Actual: it throws nothing."; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
} \
} else /*NOLINT*/ \
GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__) \
: fail(gtest_msg.value.c_str())

◆ GTEST_TEST_THROW_CATCH_STD_EXCEPTION_

#define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_ (   statement,
  expected_exception 
)