Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal Namespace Reference

Namespaces

namespace  any_cast_matcher
 
namespace  edit_distance
 
namespace  invoke_argument
 
namespace  pair_getters
 
namespace  posix
 
namespace  variant_matcher
 

Classes

class  ActionAdaptor
 
class  ActionHelper
 
class  ActionResultHolder
 
class  ActionResultHolder< void >
 
struct  AddReference
 
struct  AddReference< T & >
 
class  AllOfMatcherImpl
 
struct  AllOfResult1
 
struct  AllOfResult10
 
struct  AllOfResult2
 
struct  AllOfResult3
 
struct  AllOfResult4
 
struct  AllOfResult5
 
struct  AllOfResult6
 
struct  AllOfResult7
 
struct  AllOfResult8
 
struct  AllOfResult9
 
struct  AnyEq
 
struct  AnyGe
 
struct  AnyGt
 
struct  AnyLe
 
struct  AnyLt
 
class  AnyMatcherImpl
 
struct  AnyNe
 
class  AnyOfMatcherImpl
 
struct  AnyOfResult1
 
struct  AnyOfResult10
 
struct  AnyOfResult2
 
struct  AnyOfResult3
 
struct  AnyOfResult4
 
struct  AnyOfResult5
 
struct  AnyOfResult6
 
struct  AnyOfResult7
 
struct  AnyOfResult8
 
struct  AnyOfResult9
 
class  AnythingMatcher
 
class  ArgsMatcher
 
class  ArgsMatcherImpl
 
class  AssertHelper
 
class  AssignAction
 
class  Base
 
class  BeginEndDistanceIsMatcher
 
struct  bool_constant
 
struct  BooleanConstant
 
class  BothOfMatcher
 
class  BoundSecondMatcher
 
class  BuiltInDefaultValue
 
class  BuiltInDefaultValue< const T >
 
class  BuiltInDefaultValue< T * >
 
struct  BuiltInDefaultValueGetter
 
struct  BuiltInDefaultValueGetter< T, false >
 
struct  ByMoveWrapper
 
struct  CallableTraits
 
struct  CallableTraits< ResType(*)(ArgType)>
 
class  Castable
 
struct  CastAndAppendTransform
 
struct  CodeLocation
 
class  ComparisonBase
 
struct  CompileAssert
 
struct  CompileAssertTypesEqual
 
struct  CompileAssertTypesEqual< T, T >
 
class  ConstAndNonConstCastable
 
class  ConstCastable
 
struct  ConstCharPtr
 
struct  ConstRef
 
struct  ConstRef< T & >
 
class  ContainerEqMatcher
 
class  ContainsMatcher
 
class  ContainsMatcherImpl
 
struct  DecayArray
 
struct  DecayArray< T[]>
 
struct  DecayArray< T[N]>
 
class  DefaultGlobalTestPartResultReporter
 
class  DefaultPerThreadTestPartResultReporter
 
class  Derived
 
class  DoBothAction
 
class  DoDefaultAction
 
class  DummyMatchResultListener
 
class  EachMatcher
 
class  EachMatcherImpl
 
class  EitherOfMatcher
 
class  ElementsAreArrayMatcher
 
class  ElementsAreMatcher
 
class  ElementsAreMatcherImpl
 
struct  EnableIf
 
struct  EnableIf< true >
 
class  EndsWithMatcher
 
class  EnvironmentInvocationCatcher
 
class  Eq2Matcher
 
class  EqHelper
 
class  EqHelper< true >
 
class  EqMatcher
 
class  EventRecordingListener
 
struct  ExcessiveArg
 
class  ExpectationBase
 
class  ExpectationTester
 
class  FieldMatcher
 
class  FilePath
 
class  FinalSuccessChecker
 
class  FloatingEq2Matcher
 
class  FloatingEqMatcher
 
class  FloatingPoint
 
class  FormatForComparison
 
class  FormatForComparison< ToPrint[N], OtherOperand >
 
struct  Function
 
struct  Function< R(A1)>
 
struct  Function< R(A1, A2)>
 
struct  Function< R(A1, A2, A3)>
 
struct  Function< R(A1, A2, A3, A4)>
 
struct  Function< R(A1, A2, A3, A4, A5)>
 
struct  Function< R(A1, A2, A3, A4, A5, A6)>
 
struct  Function< R(A1, A2, A3, A4, A5, A6, A7)>
 
struct  Function< R(A1, A2, A3, A4, A5, A6, A7, A8)>
 
struct  Function< R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
 
struct  Function< R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
 
class  FunctionMocker
 
class  FunctionMocker< R(A1)>
 
class  FunctionMocker< R(A1, A2)>
 
class  FunctionMocker< R(A1, A2, A3)>
 
class  FunctionMocker< R(A1, A2, A3, A4)>
 
class  FunctionMocker< R(A1, A2, A3, A4, A5)>
 
class  FunctionMocker< R(A1, A2, A3, A4, A5, A6)>
 
class  FunctionMocker< R(A1, A2, A3, A4, A5, A6, A7)>
 
class  FunctionMocker< R(A1, A2, A3, A4, A5, A6, A7, A8)>
 
class  FunctionMocker< R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
 
class  FunctionMocker< R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
 
class  FunctionMockerBase
 
class  Ge2Matcher
 
class  GeMatcher
 
class  GoogleTestFailureReporter
 
class  Gt2Matcher
 
class  GTestFlagSaver
 
class  GTestLog
 
class  GTestMutexLock
 
class  GtMatcher
 
class  HasNewFatalFailureHelper
 
class  HasSubstrMatcher
 
struct  HasValueType
 
struct  HasValueType< T, VoidT< typename T::value_type > >
 
class  IgnoredValue
 
class  IgnoreResultAction
 
class  ImplicitlyConvertible
 
class  InvokeAction
 
class  InvokeCallbackAction
 
class  InvokeCallbackWithoutArgsAction
 
class  InvokeHelper
 
class  InvokeHelper< R, ::testing::tuple< A1 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4, A5 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4, A5, A6 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4, A5, A6, A7 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4, A5, A6, A7, A8 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4, A5, A6, A7, A8, A9 > >
 
class  InvokeHelper< R, ::testing::tuple< A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 > >
 
class  InvokeHelper< R, ::testing::tuple<> >
 
class  InvokeMethodAction
 
class  InvokeMethodWithoutArgsAction
 
class  InvokeWithoutArgsAction
 
struct  is_pointer
 
struct  is_pointer< T * >
 
struct  is_reference
 
struct  is_reference< T & >
 
struct  is_same
 
struct  is_same< T, T >
 
struct  IsAProtocolMessage
 
struct  IsHashTable
 
class  IsNullMatcher
 
struct  IsRecursiveContainer
 
struct  IsRecursiveContainerImpl
 
struct  IsRecursiveContainerImpl< C, false, HV >
 
struct  IsRecursiveContainerImpl< C, true, false >
 
struct  IsRecursiveContainerImpl< C, true, true >
 
struct  IsSame
 
struct  IsSame< T, T >
 
struct  IteratorTraits
 
struct  IteratorTraits< const T * >
 
struct  IteratorTraits< T * >
 
class  JsonUnitTestResultPrinter
 
class  KeyMatcher
 
class  KeyMatcherImpl
 
struct  KindOf
 
class  Le2Matcher
 
class  LeMatcher
 
struct  LessByName
 
struct  LessComparator
 
class  linked_ptr
 
class  linked_ptr_internal
 
struct  LinkedPtrLessThan
 
class  ListenerTest
 
struct  LosslessArithmeticConvertibleImpl
 
struct  LosslessArithmeticConvertibleImpl< kBool, bool, kBool, bool >
 
struct  LosslessArithmeticConvertibleImpl< kBool, bool, kFloatingPoint, To >
 
struct  LosslessArithmeticConvertibleImpl< kBool, bool, kInteger, To >
 
struct  LosslessArithmeticConvertibleImpl< kFloatingPoint, From, kBool, bool >
 
struct  LosslessArithmeticConvertibleImpl< kFloatingPoint, From, kInteger, To >
 
struct  LosslessArithmeticConvertibleImpl< kInteger, From, kBool, bool >
 
struct  LosslessArithmeticConvertibleImpl< kInteger, From, kFloatingPoint, To >
 
struct  LosslessArithmeticConvertibleImpl< kInteger, From, kInteger, To >
 
class  Lt2Matcher
 
class  LtMatcher
 
class  MatcherAsPredicate
 
class  MatcherBase
 
class  MatcherCastImpl
 
class  MatcherCastImpl< T, Matcher< T > >
 
class  MatcherCastImpl< T, Matcher< U > >
 
class  MatcherInterfaceAdapter
 
struct  MatcherTuple
 
struct  MatcherTuple< ::testing::tuple< A1 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4, A5 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4, A5, A6 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4, A5, A6, A7 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4, A5, A6, A7, A8 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4, A5, A6, A7, A8, A9 > >
 
struct  MatcherTuple< ::testing::tuple< A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 > >
 
struct  MatcherTuple< ::testing::tuple<> >
 
class  MatchesRegexMatcher
 
class  MatchMatrix
 
class  MaxBipartiteMatchState
 
class  MockSpec
 
class  Mutex
 
class  NativeArray
 
class  Ne2Matcher
 
class  NeMatcher
 
class  NoDefaultContructor
 
class  NotMatcher
 
class  NotMatcherImpl
 
class  NotNullMatcher
 
class  OnCallSpec
 
class  OptionalMatcher
 
class  OsStackTraceGetter
 
class  OsStackTraceGetterInterface
 
class  PairMatchBase
 
class  PairMatcher
 
class  PairMatcherImpl
 
class  ParameterizedTestCaseInfo
 
class  ParameterizedTestCaseInfoBase
 
class  ParameterizedTestCaseRegistry
 
class  ParameterizedTestFactory
 
class  ParamGenerator
 
class  ParamGeneratorInterface
 
class  ParamIterator
 
class  ParamIteratorInterface
 
struct  ParamNameGenFunc
 
class  PointeeMatcher
 
struct  PointeeOf
 
struct  PointeeOf< T * >
 
class  PointwiseMatcher
 
class  PredicateFormatterFromMatcher
 
class  PrettyUnitTestResultPrinter
 
class  PropertyMatcher
 
class  QuantifierMatcherImpl
 
class  Random
 
class  RangeGenerator
 
struct  Rank0
 
struct  Rank1
 
class  RE
 
class  ReferenceOrValueWrapper
 
class  ReferenceOrValueWrapper< T & >
 
class  ReferenceWrapper
 
class  RefMatcher
 
class  RefMatcher< T & >
 
struct  RelationToSourceCopy
 
struct  RelationToSourceReference
 
struct  remove_reference
 
struct  remove_reference< T & >
 
struct  RemoveConst
 
struct  RemoveConst< const T >
 
struct  RemoveConst< const T[N]>
 
struct  RemoveConstFromKey
 
struct  RemoveConstFromKey< std::pair< const K, V > >
 
struct  RemoveReference
 
struct  RemoveReference< T & >
 
class  ResultOfMatcher
 
class  ReturnAction
 
class  ReturnNullAction
 
class  ReturnRefAction
 
class  ReturnRefOfCopyAction
 
class  ReturnVoidAction
 
struct  RvalueRef
 
class  scoped_ptr
 
class  ScopedPrematureExitFile
 
class  SelectArgs
 
class  SelectArgs< Result, ArgumentTuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, -1, -1, -1, -1, -1, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, -1, -1, -1, -1, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, -1, -1, -1, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, k4, -1, -1, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, k4, k5, -1, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, k4, k5, k6, -1, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, k4, k5, k6, k7, -1, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, k4, k5, k6, k7, k8, -1, -1 >
 
class  SelectArgs< Result, ArgumentTuple, k1, k2, k3, k4, k5, k6, k7, k8, k9, -1 >
 
class  SetArgumentPointeeAction
 
class  SetArgumentPointeeAction< N, Proto, true >
 
class  SetErrnoAndReturnAction
 
class  SingleFailureChecker
 
class  SizeIsMatcher
 
class  StartsWithMatcher
 
struct  StaticAssertTypeEqHelper
 
struct  StaticAssertTypeEqHelper< T, T >
 
class  StlContainerView
 
class  StlContainerView< ::testing::tuple< ElementPointer, Size > >
 
class  StlContainerView< Element[N]>
 
class  StreamMatchResultListener
 
class  StrEqualityMatcher
 
class  String
 
class  TestCaseNameIs
 
class  TestEventListenersAccessor
 
class  TestEventRepeater
 
class  TestFactoryBase
 
class  TestFactoryImpl
 
class  TestMetaFactory
 
class  TestMetaFactoryBase
 
class  TestPropertyKeyIs
 
class  TestResultAccessor
 
class  ThreadLocal
 
class  To
 
struct  TraceInfo
 
class  TransformTupleValuesHelper
 
class  TrulyMatcher
 
class  TupleFields
 
class  TupleFields< Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1 >
 
class  TupleFields< Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1 >
 
struct  TuplePolicy
 
class  TuplePrefix
 
class  TuplePrefix< 0 >
 
struct  type_equals
 
struct  type_equals< T, T >
 
class  TypedExpectation
 
class  TypeIdHelper
 
class  TypeWithSize
 
class  TypeWithSize< 4 >
 
class  TypeWithSize< 8 >
 
class  UnitTestHelper
 
class  UnitTestImpl
 
class  UnitTestOptions
 
class  UnitTestRecordPropertyTestHelper
 
class  UniversalPrinter
 
class  UniversalPrinter< T & >
 
class  UniversalPrinter< T[N]>
 
class  UniversalTersePrinter
 
class  UniversalTersePrinter< char * >
 
class  UniversalTersePrinter< const char * >
 
class  UniversalTersePrinter< T & >
 
class  UniversalTersePrinter< T[N]>
 
class  UniversalTersePrinter< wchar_t * >
 
class  UnorderedElementsAreArrayMatcher
 
class  UnorderedElementsAreMatcher
 
class  UnorderedElementsAreMatcherImpl
 
class  UnorderedElementsAreMatcherImplBase
 
struct  UnorderedMatcherRequire
 
class  UntypedActionResultHolderBase
 
class  UntypedFunctionMockerBase
 
class  UntypedOnCallSpecBase
 
class  ValueArray1
 
class  ValueArray10
 
class  ValueArray11
 
class  ValueArray12
 
class  ValueArray13
 
class  ValueArray14
 
class  ValueArray15
 
class  ValueArray16
 
class  ValueArray17
 
class  ValueArray18
 
class  ValueArray19
 
class  ValueArray2
 
class  ValueArray20
 
class  ValueArray21
 
class  ValueArray22
 
class  ValueArray23
 
class  ValueArray24
 
class  ValueArray25
 
class  ValueArray26
 
class  ValueArray27
 
class  ValueArray28
 
class  ValueArray29
 
class  ValueArray3
 
class  ValueArray30
 
class  ValueArray31
 
class  ValueArray32
 
class  ValueArray33
 
class  ValueArray34
 
class  ValueArray35
 
class  ValueArray36
 
class  ValueArray37
 
class  ValueArray38
 
class  ValueArray39
 
class  ValueArray4
 
class  ValueArray40
 
class  ValueArray41
 
class  ValueArray42
 
class  ValueArray43
 
class  ValueArray44
 
class  ValueArray45
 
class  ValueArray46
 
class  ValueArray47
 
class  ValueArray48
 
class  ValueArray49
 
class  ValueArray5
 
class  ValueArray50
 
class  ValueArray6
 
class  ValueArray7
 
class  ValueArray8
 
class  ValueArray9
 
class  ValuesInIteratorRangeGenerator
 
struct  VoidT
 
class  WhenSortedByMatcher
 
class  WithArgsAction
 
class  WithoutMatchers
 
struct  WrapPrinterType
 
class  XmlUnitTestResultPrinter
 

Typedefs

typedef ::std::pair< size_t, size_t > ElementMatcherPair
 
typedef ::std::vector< ElementMatcherPairElementMatcherPairs
 
typedef ::std::vector< ::std::string > Strings
 
typedef FloatingPoint< float > Float
 
typedef FloatingPoint< double > Double
 
typedef const void * TypeId
 
typedef void(* SetUpTestCaseFunc) ()
 
typedef void(* TearDownTestCaseFunc) ()
 
typedef int IsContainer
 
typedef char IsNotContainer
 
typedef ::std::string string
 
typedef ::std::wstring wstring
 
typedef GTestMutexLock MutexLock
 
typedef bool_constant< false > false_type
 
typedef bool_constant< true > true_type
 
typedef long long BiggestInt
 
typedef TypeWithSize< 4 >::Int Int32
 
typedef TypeWithSize< 4 >::UInt UInt32
 
typedef TypeWithSize< 8 >::Int Int64
 
typedef TypeWithSize< 8 >::UInt UInt64
 
typedef TypeWithSize< 8 >::Int TimeInMillis
 

Enumerations

enum  CallReaction { kAllow , kWarn , kFail }
 
enum  TypeKind { kBool , kInteger , kFloatingPoint , kOther }
 
enum  LogSeverity { kInfo = 0 , kWarning = 1 }
 
enum  DefaultPrinterType { kPrintContainer , kPrintPointer , kPrintFunctionPointer , kPrintOther }
 
enum  GTestLogSeverity { GTEST_INFO , GTEST_WARNING , GTEST_ERROR , GTEST_FATAL }
 
enum  CharFormat { kAsIs , kHexEscape , kSpecialEscape }
 
enum  GTestColor { COLOR_DEFAULT , COLOR_RED , COLOR_GREEN , COLOR_YELLOW }
 

Functions

 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (void,)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (::std::string, "")
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (bool, false)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned char, '\0')
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed char, '\0')
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (char, '\0')
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (wchar_t, 0U)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned short, 0U)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed short, 0)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned int, 0U)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed int, 0)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned long, 0UL)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed long, 0L)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (UInt64, 0)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (Int64, 0)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (float, 0)
 
 GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (double, 0)
 
template<typename T >
void PrintTo (const ReferenceWrapper< T > &ref, ::std::ostream *os)
 
template<typename MockType >
const MockType * AdjustConstness_const (const MockType *mock)
 
template<typename MockType >
MockType * AdjustConstness_ (const MockType *mock)
 
void PrintIfNotEmpty (const std::string &explanation, ::std::ostream *os)
 
bool IsReadableTypeName (const std::string &type_name)
 
template<typename Value , typename T >
bool MatchPrintAndExplain (Value &value, const Matcher< T > &matcher, MatchResultListener *listener)
 
template<typename MatcherTuple , typename ValueTuple >
bool TupleMatches (const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
 
template<typename MatcherTuple , typename ValueTuple >
void ExplainMatchFailureTupleTo (const MatcherTuple &matchers, const ValueTuple &values, ::std::ostream *os)
 
template<typename Tuple , typename Func , typename OutIter >
OutIter TransformTupleValues (Func f, const Tuple &t, OutIter out)
 
bool CaseInsensitiveCStringEquals (const char *lhs, const char *rhs)
 
bool CaseInsensitiveCStringEquals (const wchar_t *lhs, const wchar_t *rhs)
 
template<typename StringType >
bool CaseInsensitiveStringEquals (const StringType &s1, const StringType &s2)
 
template<typename M >
PredicateFormatterFromMatcher< M > MakePredicateFormatterFromMatcher (M matcher)
 
GTEST_API_ ElementMatcherPairs FindMaxBipartiteMatching (const MatchMatrix &g)
 
template<typename Tuple2Matcher , typename Second >
BoundSecondMatcher< Tuple2Matcher, Second > MatcherBindSecond (const Tuple2Matcher &tm, const Second &second)
 
GTEST_API_ std::string FormatMatcherDescription (bool negation, const char *matcher_name, const Strings &param_values)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator CopyElements (InputIterator first, InputIterator last, OutputIterator output)
 
GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_ (g_gmock_mutex)
 
GTEST_API_ void LogWithLocation (testing::internal::LogSeverity severity, const char *file, int line, const std::string &message)
 
void ReportUninterestingCall (CallReaction reaction, const std::string &msg)
 
GTEST_API_ std::string JoinAsTuple (const Strings &fields)
 
GTEST_API_ std::string ConvertIdentifierNameToWords (const char *id_name)
 
template<typename Pointer >
const Pointer::element_type * GetRawPointer (const Pointer &p)
 
template<typename Element >
Element * GetRawPointer (Element *p)
 
 GMOCK_DECLARE_KIND_ (bool, kBool)
 
 GMOCK_DECLARE_KIND_ (char, kInteger)
 
 GMOCK_DECLARE_KIND_ (signed char, kInteger)
 
 GMOCK_DECLARE_KIND_ (unsigned char, kInteger)
 
 GMOCK_DECLARE_KIND_ (short, kInteger)
 
 GMOCK_DECLARE_KIND_ (unsigned short, kInteger)
 
 GMOCK_DECLARE_KIND_ (int, kInteger)
 
 GMOCK_DECLARE_KIND_ (unsigned int, kInteger)
 
 GMOCK_DECLARE_KIND_ (long, kInteger)
 
 GMOCK_DECLARE_KIND_ (unsigned long, kInteger)
 
 GMOCK_DECLARE_KIND_ (wchar_t, kInteger)
 
 GMOCK_DECLARE_KIND_ (Int64, kInteger)
 
 GMOCK_DECLARE_KIND_ (UInt64, kInteger)
 
 GMOCK_DECLARE_KIND_ (float, kFloatingPoint)
 
 GMOCK_DECLARE_KIND_ (double, kFloatingPoint)
 
 GMOCK_DECLARE_KIND_ (long double, kFloatingPoint)
 
template<typename From , typename To >
void Assert (bool condition, const char *file, int line)
 
void Expect (bool condition, const char *file, int line, const std::string &msg)
 
void Expect (bool condition, const char *file, int line)
 
GTEST_API_ bool LogIsVisible (LogSeverity severity)
 
GTEST_API_ void Log (LogSeverity severity, const std::string &message, int stack_frames_to_skip)
 
GTEST_API_ WithoutMatchers GetWithoutMatchers ()
 
template<typename T >
T Invalid ()
 
GTEST_API_ void IllegalDoDefault (const char *file, int line)
 
GTEST_API_ FailureReporterInterface * GetFailureReporter ()
 
GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_ (g_gmock_mutex)
 
CallReaction intToCallReaction (int mock_behavior)
 
template<typename CharType >
void InitGoogleMockImpl (int *argc, CharType **argv)
 
template<typename T >
std::string StreamableToString (const T &streamable)
 
 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ (char)
 
 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ (wchar_t)
 
 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_ (char, ::std::string)
 
template<typename T1 , typename T2 >
std::string FormatForComparisonFailureMessage (const T1 &value, const T2 &)
 
template<typename T >
void UniversalPrint (const T &value, ::std::ostream *os)
 
template<typename C >
void DefaultPrintTo (WrapPrinterType< kPrintContainer >, const C &container, ::std::ostream *os)
 
template<typename T >
void DefaultPrintTo (WrapPrinterType< kPrintPointer >, T *p, ::std::ostream *os)
 
template<typename T >
void DefaultPrintTo (WrapPrinterType< kPrintFunctionPointer >, T *p, ::std::ostream *os)
 
template<typename T >
void DefaultPrintTo (WrapPrinterType< kPrintOther >, const T &value, ::std::ostream *os)
 
template<typename T >
void PrintTo (const T &value, ::std::ostream *os)
 
GTEST_API_ void PrintTo (unsigned char c, ::std::ostream *os)
 
GTEST_API_ void PrintTo (signed char c, ::std::ostream *os)
 
void PrintTo (char c, ::std::ostream *os)
 
void PrintTo (bool x, ::std::ostream *os)
 
GTEST_API_ void PrintTo (wchar_t wc, ::std::ostream *os)
 
GTEST_API_ void PrintTo (const char *s, ::std::ostream *os)
 
void PrintTo (char *s, ::std::ostream *os)
 
void PrintTo (const signed char *s, ::std::ostream *os)
 
void PrintTo (signed char *s, ::std::ostream *os)
 
void PrintTo (const unsigned char *s, ::std::ostream *os)
 
void PrintTo (unsigned char *s, ::std::ostream *os)
 
GTEST_API_ void PrintTo (const wchar_t *s, ::std::ostream *os)
 
void PrintTo (wchar_t *s, ::std::ostream *os)
 
template<typename T >
void PrintRawArrayTo (const T a[], size_t count, ::std::ostream *os)
 
GTEST_API_ void PrintStringTo (const ::std::string &s, ::std::ostream *os)
 
void PrintTo (const ::std::string &s, ::std::ostream *os)
 
template<typename T1 , typename T2 >
void PrintTo (const ::std::pair< T1, T2 > &value, ::std::ostream *os)
 
template<typename T >
void UniversalPrintArray (const T *begin, size_t len, ::std::ostream *os)
 
GTEST_API_ void UniversalPrintArray (const char *begin, size_t len, ::std::ostream *os)
 
GTEST_API_ void UniversalPrintArray (const wchar_t *begin, size_t len, ::std::ostream *os)
 
template<typename T >
void UniversalTersePrint (const T &value, ::std::ostream *os)
 
class UnitTestImplGetUnitTestImpl ()
 
void ReportFailureInUnknownLocation (TestPartResult::Type result_type, const std::string &message)
 
template<typename T1 , typename T2 >
AssertionResult CmpHelperEQFailure (const char *lhs_expression, const char *rhs_expression, const T1 &lhs, const T2 &rhs)
 
template<typename T1 , typename T2 >
AssertionResult CmpHelperEQ (const char *lhs_expression, const char *rhs_expression, const T1 &lhs, const T2 &rhs)
 
GTEST_API_ AssertionResult CmpHelperEQ (const char *lhs_expression, const char *rhs_expression, BiggestInt lhs, BiggestInt rhs)
 
template<typename T1 , typename T2 >
AssertionResult CmpHelperOpFailure (const char *expr1, const char *expr2, const T1 &val1, const T2 &val2, const char *op)
 
 GTEST_IMPL_CMP_HELPER_ (NE, !=)
 
 GTEST_IMPL_CMP_HELPER_ (LE,<=)
 
 GTEST_IMPL_CMP_HELPER_ (LT,<)
 
 GTEST_IMPL_CMP_HELPER_ (GE, >=)
 
 GTEST_IMPL_CMP_HELPER_ (GT, >)
 
GTEST_API_ AssertionResult CmpHelperSTREQ (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult CmpHelperSTRCASEEQ (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult CmpHelperSTRNE (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult CmpHelperSTRCASENE (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
 
GTEST_API_ AssertionResult CmpHelperSTREQ (const char *s1_expression, const char *s2_expression, const wchar_t *s1, const wchar_t *s2)
 
GTEST_API_ AssertionResult CmpHelperSTRNE (const char *s1_expression, const char *s2_expression, const wchar_t *s1, const wchar_t *s2)
 
template<typename RawType >
AssertionResult CmpHelperFloatingPointEQ (const char *lhs_expression, const char *rhs_expression, RawType lhs_value, RawType rhs_value)
 
GTEST_API_ AssertionResult DoubleNearPredFormat (const char *expr1, const char *expr2, const char *abs_error_expr, double val1, double val2, double abs_error)
 
 GTEST_DECLARE_string_ (internal_run_death_test)
 
char IsNullLiteralHelper (Secret *p)
 
char(& IsNullLiteralHelper (...))[2]
 
GTEST_API_ std::string AppendUserMessage (const std::string &gtest_msg, const Message &user_msg)
 
GTEST_API_ std::string DiffStrings (const std::string &left, const std::string &right, size_t *total_line_count)
 
GTEST_API_ AssertionResult 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 GetBoolAssertionFailureMessage (const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)
 
template<typename T >
TypeId GetTypeId ()
 
GTEST_API_ TypeId GetTestTypeId ()
 
GTEST_API_ TestInfoMakeAndRegisterTestInfo (const char *test_case_name, const char *name, const char *type_param, const char *value_param, CodeLocation code_location, TypeId fixture_class_id, SetUpTestCaseFunc set_up_tc, TearDownTestCaseFunc tear_down_tc, TestFactoryBase *factory)
 
GTEST_API_ bool SkipPrefix (const char *prefix, const char **pstr)
 
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop (UnitTest *unit_test, int skip_count)
 
GTEST_API_ bool AlwaysTrue ()
 
bool AlwaysFalse ()
 
template<class C >
IsContainer IsContainerTest (int, typename C::iterator *=NULL, typename C::const_iterator *=NULL)
 
template<class C >
IsNotContainer IsContainerTest (long)
 
template<typename T , typename U >
bool ArrayEq (const T *lhs, size_t size, const U *rhs)
 
template<typename T , typename U >
bool ArrayEq (const T &lhs, const U &rhs)
 
template<typename T , typename U , size_t N>
bool ArrayEq (const T(&lhs)[N], const U(&rhs)[N])
 
template<typename Iter , typename Element >
Iter ArrayAwareFind (Iter begin, Iter end, const Element &elem)
 
template<typename T , typename U >
void CopyArray (const T *from, size_t size, U *to)
 
template<typename T , typename U >
void CopyArray (const T &from, U *to)
 
template<typename T , typename U , size_t N>
void CopyArray (const T(&from)[N], U(*to)[N])
 
GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_ (g_linked_ptr_mutex)
 
template<typename T >
bool operator== (T *ptr, const linked_ptr< T > &x)
 
template<typename T >
bool operator!= (T *ptr, const linked_ptr< T > &x)
 
template<typename T >
linked_ptr< Tmake_linked_ptr (T *ptr)
 
GTEST_API_ void ReportInvalidTestCaseType (const char *test_case_name, CodeLocation code_location)
 
template<class ParamType >
std::string DefaultParamName (const TestParamInfo< ParamType > &info)
 
template<class ParamType , class ParamNameGenFunctor >
ParamNameGenFunctor GetParamNameGen (ParamNameGenFunctor func)
 
template<class ParamType >
ParamNameGenFunc< ParamType >::TypeGetParamNameGen ()
 
GTEST_API_ bool IsTrue (bool condition)
 
GTEST_API_::std::string FormatFileLocation (const char *file, int line)
 
GTEST_API_::std::string FormatCompilerIndependentFileLocation (const char *file, int line)
 
void LogToStderr ()
 
void FlushInfoLog ()
 
template<typename T >
const Tmove (const T &t)
 
template<typename T >
 GTEST_ADD_REFERENCE_ (T) forward(GTEST_ADD_REFERENCE_(T) t)
 
template<typename To >
To ImplicitCast_ (To x)
 
template<typename To , typename From >
To DownCast_ (From *f)
 
template<class Derived , class Base >
Derived * CheckedDowncastToActualType (Base *base)
 
GTEST_API_ void CaptureStdout ()
 
GTEST_API_ std::string GetCapturedStdout ()
 
GTEST_API_ void CaptureStderr ()
 
GTEST_API_ std::string GetCapturedStderr ()
 
GTEST_API_ size_t GetFileSize (FILE *file)
 
GTEST_API_ std::string ReadEntireFile (FILE *file)
 
GTEST_API_ std::vector< std::string > GetArgvs ()
 
GTEST_API_ size_t GetThreadCount ()
 
bool IsAlpha (char ch)
 
bool IsAlNum (char ch)
 
bool IsDigit (char ch)
 
bool IsLower (char ch)
 
bool IsSpace (char ch)
 
bool IsUpper (char ch)
 
bool IsXDigit (char ch)
 
bool IsXDigit (wchar_t ch)
 
char ToLower (char ch)
 
char ToUpper (char ch)
 
std::string StripTrailingSpaces (std::string str)
 
bool ParseInt32 (const Message &src_text, const char *str, Int32 *value)
 
bool BoolFromGTestEnv (const char *flag, bool default_val)
 
GTEST_API_ Int32 Int32FromGTestEnv (const char *flag, Int32 default_val)
 
std::string OutputFlagAlsoCheckEnvVar ()
 
const char * StringFromGTestEnv (const char *flag, const char *default_val)
 
GTEST_API_ std::string StringStreamToString (::std::stringstream *stream)
 
std::string CanonicalizeForStdLibVersioning (std::string s)
 
template<typename T >
std::string GetTypeName ()
 
 GTEST_DEFINE_string_ (internal_run_death_test, "", "Indicates the file, line number, temporal index of " "the single death test to run, and a file descriptor to " "which a success code may be sent, all separated by " "the '|' characters. This flag is specified if and only if the current " "process is a sub-process launched for running a thread-safe " "death test. FOR INTERNAL USE ONLY.")
 
GTEST_API_ TimeInMillis GetTimeInMillis ()
 
GTEST_API_ bool ShouldUseColor (bool stdout_is_tty)
 
GTEST_API_ std::string FormatTimeInMillisAsSeconds (TimeInMillis ms)
 
GTEST_API_ std::string FormatEpochTimeInMillisAsIso8601 (TimeInMillis ms)
 
GTEST_API_ bool ParseInt32Flag (const char *str, const char *flag, Int32 *value)
 
int GetRandomSeedFromFlag (Int32 random_seed_flag)
 
int GetNextRandomSeed (int seed)
 
GTEST_API_ std::string CodePointToUtf8 (UInt32 code_point)
 
GTEST_API_ std::string WideStringToUtf8 (const wchar_t *str, int num_chars)
 
void WriteToShardStatusFileIfNeeded ()
 
GTEST_API_ bool ShouldShard (const char *total_shards_str, const char *shard_index_str, bool in_subprocess_for_death_test)
 
GTEST_API_ Int32 Int32FromEnvOrDie (const char *env_var, Int32 default_val)
 
GTEST_API_ bool ShouldRunTestOnShard (int total_shards, int shard_index, int test_id)
 
template<class Container , typename Predicate >
int CountIf (const Container &c, Predicate predicate)
 
template<class Container , typename Functor >
void ForEach (const Container &c, Functor functor)
 
template<typename E >
GetElementOr (const std::vector< E > &v, int i, E default_value)
 
template<typename E >
void ShuffleRange (internal::Random *random, int begin, int end, std::vector< E > *v)
 
template<typename E >
void Shuffle (internal::Random *random, std::vector< E > *v)
 
GTEST_API_ FilePath GetCurrentExecutableName ()
 
GTEST_API_ void ParseGoogleTestFlagsOnly (int *argc, char **argv)
 
GTEST_API_ void ParseGoogleTestFlagsOnly (int *argc, wchar_t **argv)
 
bool IsPrintableAscii (wchar_t c)
 
template<typename UnsignedChar , typename Char >
void PrintCharAndCodeTo (Char c, ostream *os)
 
void PrintTo (wchar_t wc, ostream *os)
 
void UniversalPrintArray (const char *begin, size_t len, ostream *os)
 
void UniversalPrintArray (const wchar_t *begin, size_t len, ostream *os)
 
void PrintTo (const char *s, ostream *os)
 
void PrintTo (const wchar_t *s, ostream *os)
 
void PrintStringTo (const ::std::string &s, ostream *os)
 
GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_ (g_linked_ptr_mutex)
 
void SplitString (const ::std::string &str, char delimiter, ::std::vector< ::std::string > *dest)
 
template<typename RawType >
AssertionResult FloatingPointLE (const char *expr1, const char *expr2, RawType val1, RawType val2)
 
UInt32 ChopLowBits (UInt32 *bits, int n)
 
bool IsUtf16SurrogatePair (wchar_t first, wchar_t second)
 
UInt32 CreateCodePointFromUtf16SurrogatePair (wchar_t first, wchar_t second)
 
template<class T , typename Result >
Result HandleSehExceptionsInMethodIfSupported (T *object, Result(T::*method)(), const char *location)
 
template<class T , typename Result >
Result HandleExceptionsInMethodIfSupported (T *object, Result(T::*method)(), const char *location)
 
template<typename CharType >
void ParseGoogleTestFlagsOnlyImpl (int *argc, CharType **argv)
 
template<typename CharType >
void InitGoogleTestImpl (int *argc, CharType **argv)
 
 TEST_F (ListenerTest, DoesFoo)
 
 TEST_F (ListenerTest, DoesBar)
 
 TEST (IsXDigitTest, WorksForNarrowAscii)
 
 TEST (IsXDigitTest, ReturnsFalseForNarrowNonAscii)
 
 TEST (IsXDigitTest, WorksForWideAscii)
 
 TEST (IsXDigitTest, ReturnsFalseForWideNonAscii)
 
 TEST (ImplicitCastTest, ConvertsPointers)
 
 TEST (ImplicitCastTest, CanUseInheritance)
 
 TEST (ImplicitCastTest, CanUseNonConstCastOperator)
 
 TEST (ImplicitCastTest, CanUseConstCastOperatorOnConstValues)
 
 TEST (ImplicitCastTest, CanSelectBetweenConstAndNonConstCasrAppropriately)
 
 TEST (ImplicitCastTest, CanUseImplicitConstructor)
 
 TEST (IteratorTraitsTest, WorksForSTLContainerIterators)
 
 TEST (IteratorTraitsTest, WorksForPointerToNonConst)
 
 TEST (IteratorTraitsTest, WorksForPointerToConst)
 
 TEST (ScopedPtrTest, DefinesElementType)
 
 TEST (GtestCheckSyntaxTest, BehavesLikeASingleStatement)
 
 TEST (GtestCheckSyntaxTest, WorksWithSwitch)
 
 TEST (FormatFileLocationTest, FormatsFileLocation)
 
 TEST (FormatFileLocationTest, FormatsUnknownFile)
 
 TEST (FormatFileLocationTest, FormatsUknownLine)
 
 TEST (FormatFileLocationTest, FormatsUknownFileAndLine)
 
 TEST (FormatCompilerIndependentFileLocationTest, FormatsFileLocation)
 
 TEST (FormatCompilerIndependentFileLocationTest, FormatsUknownFile)
 
 TEST (FormatCompilerIndependentFileLocationTest, FormatsUknownLine)
 
 TEST (FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine)
 
 TEST (GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads)
 
 TEST (GtestCheckDeathTest, DiesWithCorrectOutputOnFailure)
 
 TEST (RegexEngineSelectionTest, SelectsCorrectRegexEngine)
 
 TEST (CaptureTest, CapturesStdout)
 
 TEST (CaptureTest, CapturesStderr)
 
 TEST (CaptureTest, CapturesStdoutAndStderr)
 
 TEST (CaptureDeathTest, CannotReenterStdoutCapture)
 
 TEST (ThreadLocalTest, DefaultConstructorInitializesToDefaultValues)
 
 TEST (ThreadLocalTest, SingleParamConstructorInitializesToParam)
 
 TEST (ThreadLocalTest, ValueDefaultContructorIsNotRequiredForParamVersion)
 
 TEST (ThreadLocalTest, GetAndPointerReturnSameValue)
 
 TEST (ThreadLocalTest, PointerAndConstPointerReturnSameValue)
 
 TEST (ApiTest, UnitTestImmutableAccessorsWork)
 
AssertionResult IsNull (const char *str)
 
 TEST (ApiTest, TestCaseImmutableAccessorsWork)
 
 TEST (ApiTest, TestCaseDisabledAccessorsWork)
 
 TEST (ApiTest, DISABLED_Dummy1)
 
 TEST (DISABLED_Test, Dummy2)
 

Variables

GTEST_API_ ThreadLocal< Sequence * > g_gmock_implicit_sequence
 
const char kInfoVerbosity [] = "info"
 
const char kWarningVerbosity [] = "warning"
 
const char kErrorVerbosity [] = "error"
 
const char kDeathTestStyleFlag [] = "death_test_style"
 
const char kDeathTestUseFork [] = "death_test_use_fork"
 
const char kInternalRunDeathTestFlag [] = "internal_run_death_test"
 
GTEST_API_ const char kStackTraceMarker [] = "\nStack trace:\n"
 
const BiggestInt kMaxBiggestInt
 
const char kPathSeparator = '/'
 
const char kCurrentDirectoryString [] = "./"
 
GTEST_API_ const TypeId kTestTypeIdInGoogleTest = GetTestTypeId()
 
const char kAlsoRunDisabledTestsFlag [] = "also_run_disabled_tests"
 
const char kBreakOnFailureFlag [] = "break_on_failure"
 
const char kCatchExceptionsFlag [] = "catch_exceptions"
 
const char kColorFlag [] = "color"
 
const char kFilterFlag [] = "filter"
 
const char kListTestsFlag [] = "list_tests"
 
const char kOutputFlag [] = "output"
 
const char kPrintTimeFlag [] = "print_time"
 
const char kPrintUTF8Flag [] = "print_utf8"
 
const char kRandomSeedFlag [] = "random_seed"
 
const char kRepeatFlag [] = "repeat"
 
const char kShuffleFlag [] = "shuffle"
 
const char kStackTraceDepthFlag [] = "stack_trace_depth"
 
const char kStreamResultToFlag [] = "stream_result_to"
 
const char kThrowOnFailureFlag [] = "throw_on_failure"
 
const char kFlagfileFlag [] = "flagfile"
 
const int kMaxRandomSeed = 99999
 
GTEST_API_ bool g_help_flag = false
 
class testing::internal::GTestFlagSaver GTEST_ATTRIBUTE_UNUSED_
 
const int kStdOutFileno = STDOUT_FILENO
 
const int kStdErrFileno = STDERR_FILENO
 
const char kUnknownFile [] = "unknown file"
 
::std::vector< std::string > g_argvs
 
const UInt32 kMaxCodePoint1 = (static_cast<UInt32>(1) << 7) - 1
 
const UInt32 kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1
 
const UInt32 kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1
 
const UInt32 kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1
 
const int kTypedTestCases = 0
 
const int kTypedTests = 0
 

Typedef Documentation

◆ BiggestInt

typedef long long testing::internal::BiggestInt

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

◆ Double

Definition at line 403 of file gtest-internal.h.

◆ ElementMatcherPair

typedef ::std::pair<size_t, size_t> testing::internal::ElementMatcherPair

Definition at line 3649 of file gmock-matchers.h.

◆ ElementMatcherPairs

Definition at line 3650 of file gmock-matchers.h.

◆ false_type

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

◆ Float

Definition at line 402 of file gtest-internal.h.

◆ Int32

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

◆ Int64

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

◆ IsContainer

Definition at line 891 of file gtest-internal.h.

◆ IsNotContainer

Definition at line 911 of file gtest-internal.h.

◆ MutexLock

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

◆ SetUpTestCaseFunc

typedef void(* testing::internal::SetUpTestCaseFunc) ()

Definition at line 483 of file gtest-internal.h.

◆ string

typedef ::std::string testing::internal::string

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

◆ Strings

typedef ::std::vector< ::std::string> testing::internal::Strings

Definition at line 938 of file gtest-printers.h.

◆ TearDownTestCaseFunc

typedef void(* testing::internal::TearDownTestCaseFunc) ()

Definition at line 484 of file gtest-internal.h.

◆ TimeInMillis

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

◆ true_type

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

◆ TypeId

typedef const void* testing::internal::TypeId

Definition at line 411 of file gtest-internal.h.

◆ UInt32

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

◆ UInt64

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

◆ wstring

typedef ::std::wstring testing::internal::wstring

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

Enumeration Type Documentation

◆ CallReaction

Enumerator
kAllow 
kWarn 
kFail 

Definition at line 367 of file gmock-spec-builders.h.

367 {
368 kAllow,
369 kWarn,
370 kFail,
371};

◆ CharFormat

Enumerator
kAsIs 
kHexEscape 
kSpecialEscape 

Definition at line 129 of file gtest-printers.cc.

◆ DefaultPrinterType

Enumerator
kPrintContainer 
kPrintPointer 
kPrintFunctionPointer 
kPrintOther 

Definition at line 403 of file gtest-printers.h.

◆ GTestColor

Enumerator
COLOR_DEFAULT 
COLOR_RED 
COLOR_GREEN 
COLOR_YELLOW 

Definition at line 2892 of file gtest.cc.

◆ GTestLogSeverity

Enumerator
GTEST_INFO 
GTEST_WARNING 
GTEST_ERROR 
GTEST_FATAL 

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

◆ LogSeverity

Enumerator
kInfo 
kWarning 

Definition at line 319 of file gmock-internal-utils.h.

◆ TypeKind

Enumerator
kBool 
kInteger 
kFloatingPoint 
kOther 

Definition at line 139 of file gmock-internal-utils.h.

Function Documentation

◆ AdjustConstness_()

template<typename MockType >
MockType * testing::internal::AdjustConstness_ ( const MockType * mock)

Definition at line 383 of file gmock-generated-function-mockers.h.

383 {
384 return const_cast<MockType*>(mock);
385}

◆ AdjustConstness_const()

template<typename MockType >
const MockType * testing::internal::AdjustConstness_const ( const MockType * mock)

Definition at line 376 of file gmock-generated-function-mockers.h.

376 {
377 return mock;
378}

◆ AlwaysFalse()

bool testing::internal::AlwaysFalse ( )
inline

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

719{ return !AlwaysTrue(); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AlwaysTrue()

bool testing::internal::AlwaysTrue ( )

Definition at line 5406 of file gtest.cc.

5406 {
5407#if GTEST_HAS_EXCEPTIONS
5408 // This condition is always false so AlwaysTrue() never actually throws,
5409 // but it makes the compiler think that it may throw.
5410 if (IsTrue(false))
5411 throw ClassUniqueToAlwaysTrue();
5412#endif // GTEST_HAS_EXCEPTIONS
5413 return true;
5414}
GTEST_API_ bool IsTrue(bool condition)
Definition gtest.cc:5404
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendUserMessage()

std::string testing::internal::AppendUserMessage ( const std::string & gtest_msg,
const Message & user_msg )

Definition at line 2016 of file gtest.cc.

2017 {
2018 // Appends the user message if it's non-empty.
2019 const std::string user_msg_string = user_msg.GetString();
2020 if (user_msg_string.empty()) {
2021 return gtest_msg;
2022 }
2023
2024 return gtest_msg + "\n" + user_msg_string;
2025}
std::string GetString() const
Definition gtest.cc:995
Here is the call graph for this function:

◆ ArrayAwareFind()

template<typename Iter , typename Element >
Iter testing::internal::ArrayAwareFind ( Iter begin,
Iter end,
const Element & elem )

Definition at line 1023 of file gtest-internal.h.

1023 {
1024 for (Iter it = begin; it != end; ++it) {
1025 if (internal::ArrayEq(*it, elem))
1026 return it;
1027 }
1028 return end;
1029}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayEq() [1/3]

template<typename T , typename U >
bool testing::internal::ArrayEq ( const T & lhs,
const U & rhs )
inline

Definition at line 1000 of file gtest-internal.h.

1000{ return lhs == rhs; }

◆ ArrayEq() [2/3]

template<typename T , typename U >
bool testing::internal::ArrayEq ( const T * lhs,
size_t size,
const U * rhs )

Definition at line 1012 of file gtest-internal.h.

1012 {
1013 for (size_t i = 0; i != size; i++) {
1014 if (!internal::ArrayEq(lhs[i], rhs[i]))
1015 return false;
1016 }
1017 return true;
1018}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayEq() [3/3]

template<typename T , typename U , size_t N>
bool testing::internal::ArrayEq ( const T(&) lhs[N],
const U(&) rhs[N] )
inline

Definition at line 1004 of file gtest-internal.h.

1004 {
1005 return internal::ArrayEq(lhs, N, rhs);
1006}
const int N
Definition quantize.cpp:54
Here is the call graph for this function:

◆ Assert()

template<typename From , typename To >
void testing::internal::Assert ( bool condition,
const char * file,
int line )
inline

Definition at line 301 of file gmock-internal-utils.h.

301 {
302 Assert(condition, file, line, "Assertion failed.");
303}
void Assert(bool condition, const char *file, int line)
Here is the caller graph for this function:

◆ BoolFromGTestEnv()

bool testing::internal::BoolFromGTestEnv ( const char * flag,
bool default_val )

Definition at line 1209 of file gtest-port.cc.

1209 {
1210#if defined(GTEST_GET_BOOL_FROM_ENV_)
1211 return GTEST_GET_BOOL_FROM_ENV_(flag, default_value);
1212#else
1213 const std::string env_var = FlagToEnvVar(flag);
1214 const char* const string_value = posix::GetEnv(env_var.c_str());
1215 return string_value == NULL ?
1216 default_value : strcmp(string_value, "0") != 0;
1217#endif // defined(GTEST_GET_BOOL_FROM_ENV_)
1218}
const char * GetEnv(const char *name)
Here is the call graph for this function:

◆ CanonicalizeForStdLibVersioning()

std::string testing::internal::CanonicalizeForStdLibVersioning ( std::string s)
inline

Definition at line 64 of file gtest-type-util.h.

64 {
65 static const char prefix[] = "std::__";
66 if (s.compare(0, strlen(prefix), prefix) == 0) {
67 std::string::size_type end = s.find("::", strlen(prefix));
68 if (end != s.npos) {
69 // Erase everything between the initial `std` and the second `::`.
70 s.erase(strlen("std"), end - strlen("std"));
71 }
72 }
73 return s;
74}
char * s
Here is the caller graph for this function:

◆ CaptureStderr()

GTEST_API_ void testing::internal::CaptureStderr ( )
Here is the caller graph for this function:

◆ CaptureStdout()

GTEST_API_ void testing::internal::CaptureStdout ( )
Here is the caller graph for this function:

◆ CaseInsensitiveCStringEquals() [1/2]

bool testing::internal::CaseInsensitiveCStringEquals ( const char * lhs,
const char * rhs )
inline

Definition at line 1259 of file gmock-matchers.h.

1259 {
1260 return String::CaseInsensitiveCStringEquals(lhs, rhs);
1261}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaseInsensitiveCStringEquals() [2/2]

bool testing::internal::CaseInsensitiveCStringEquals ( const wchar_t * lhs,
const wchar_t * rhs )
inline

Definition at line 1263 of file gmock-matchers.h.

1264 {
1265 return String::CaseInsensitiveWideCStringEquals(lhs, rhs);
1266}
Here is the call graph for this function:

◆ CaseInsensitiveStringEquals()

template<typename StringType >
bool testing::internal::CaseInsensitiveStringEquals ( const StringType & s1,
const StringType & s2 )

Definition at line 1271 of file gmock-matchers.h.

1272 {
1273 // Are the heads equal?
1274 if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) {
1275 return false;
1276 }
1277
1278 // Skip the equal heads.
1279 const typename StringType::value_type nul = 0;
1280 const size_t i1 = s1.find(nul), i2 = s2.find(nul);
1281
1282 // Are we at the end of either s1 or s2?
1283 if (i1 == StringType::npos || i2 == StringType::npos) {
1284 return i1 == i2;
1285 }
1286
1287 // Are the tails equal?
1288 return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1));
1289}
bool CaseInsensitiveCStringEquals(const char *lhs, const char *rhs)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckedDowncastToActualType()

template<class Derived , class Base >
Derived * testing::internal::CheckedDowncastToActualType ( Base * base)

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

1510 {
1511#if GTEST_HAS_RTTI
1512 GTEST_CHECK_(typeid(*base) == typeid(Derived));
1513#endif
1514
1515#if GTEST_HAS_DOWNCAST_
1516 return ::down_cast<Derived*>(base);
1517#elif GTEST_HAS_RTTI
1518 return dynamic_cast<Derived*>(base); // NOLINT
1519#else
1520 return static_cast<Derived*>(base); // Poor man's downcast.
1521#endif
1522}
#define GTEST_CHECK_(condition)
Here is the caller graph for this function:

◆ ChopLowBits()

UInt32 testing::internal::ChopLowBits ( UInt32 * bits,
int n )
inline

Definition at line 1762 of file gtest.cc.

1762 {
1763 const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);
1764 *bits >>= n;
1765 return low_bits;
1766}
TypeWithSize< 4 >::UInt UInt32
Here is the caller graph for this function:

◆ CmpHelperEQ() [1/2]

AssertionResult testing::internal::CmpHelperEQ ( const char * lhs_expression,
const char * rhs_expression,
BiggestInt lhs,
BiggestInt rhs )

Definition at line 1452 of file gtest.cc.

1455 {
1456 if (lhs == rhs) {
1457 return AssertionSuccess();
1458 }
1459
1460 return EqFailure(lhs_expression,
1461 rhs_expression,
1462 FormatForComparisonFailureMessage(lhs, rhs),
1463 FormatForComparisonFailureMessage(rhs, lhs),
1464 false);
1465}
Here is the call graph for this function:

◆ CmpHelperEQ() [2/2]

template<typename T1 , typename T2 >
AssertionResult testing::internal::CmpHelperEQ ( const char * lhs_expression,
const char * rhs_expression,
const T1 & lhs,
const T2 & rhs )

Definition at line 1428 of file gtest.h.

1431 {
1432 if (lhs == rhs) {
1433 return AssertionSuccess();
1434 }
1435
1436 return CmpHelperEQFailure(lhs_expression, rhs_expression, lhs, rhs);
1437}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperEQFailure()

template<typename T1 , typename T2 >
AssertionResult testing::internal::CmpHelperEQFailure ( const char * lhs_expression,
const char * rhs_expression,
const T1 & lhs,
const T2 & rhs )

Definition at line 1416 of file gtest.h.

1418 {
1419 return EqFailure(lhs_expression,
1420 rhs_expression,
1423 false);
1424}
std::string FormatForComparisonFailureMessage(const T1 &value, const T2 &)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperFloatingPointEQ()

template<typename RawType >
AssertionResult testing::internal::CmpHelperFloatingPointEQ ( const char * lhs_expression,
const char * rhs_expression,
RawType lhs_value,
RawType rhs_value )

Definition at line 1670 of file gtest.h.

1673 {
1674 const FloatingPoint<RawType> lhs(lhs_value), rhs(rhs_value);
1675
1676 if (lhs.AlmostEquals(rhs)) {
1677 return AssertionSuccess();
1678 }
1679
1680 ::std::stringstream lhs_ss;
1681 lhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
1682 << lhs_value;
1683
1684 ::std::stringstream rhs_ss;
1685 rhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
1686 << rhs_value;
1687
1688 return EqFailure(lhs_expression,
1689 rhs_expression,
1690 StringStreamToString(&lhs_ss),
1691 StringStreamToString(&rhs_ss),
1692 false);
1693}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperOpFailure()

template<typename T1 , typename T2 >
AssertionResult testing::internal::CmpHelperOpFailure ( const char * expr1,
const char * expr2,
const T1 & val1,
const T2 & val2,
const char * op )

Definition at line 1525 of file gtest.h.

1527 {
1528 return AssertionFailure()
1529 << "Expected: (" << expr1 << ") " << op << " (" << expr2
1530 << "), actual: " << FormatForComparisonFailureMessage(val1, val2)
1531 << " vs " << FormatForComparisonFailureMessage(val2, val1);
1532}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperSTRCASEEQ()

AssertionResult testing::internal::CmpHelperSTRCASEEQ ( const char * s1_expression,
const char * s2_expression,
const char * s1,
const char * s2 )

Definition at line 1518 of file gtest.cc.

1521 {
1522 if (String::CaseInsensitiveCStringEquals(lhs, rhs)) {
1523 return AssertionSuccess();
1524 }
1525
1526 return EqFailure(lhs_expression,
1527 rhs_expression,
1528 PrintToString(lhs),
1529 PrintToString(rhs),
1530 true);
1531}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperSTRCASENE()

AssertionResult testing::internal::CmpHelperSTRCASENE ( const char * s1_expression,
const char * s2_expression,
const char * s1,
const char * s2 )

Definition at line 1548 of file gtest.cc.

1551 {
1552 if (!String::CaseInsensitiveCStringEquals(s1, s2)) {
1553 return AssertionSuccess();
1554 } else {
1555 return AssertionFailure()
1556 << "Expected: (" << s1_expression << ") != ("
1557 << s2_expression << ") (ignoring case), actual: \""
1558 << s1 << "\" vs \"" << s2 << "\"";
1559 }
1560}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperSTREQ() [1/2]

AssertionResult testing::internal::CmpHelperSTREQ ( const char * s1_expression,
const char * s2_expression,
const char * s1,
const char * s2 )

Definition at line 1502 of file gtest.cc.

1505 {
1506 if (String::CStringEquals(lhs, rhs)) {
1507 return AssertionSuccess();
1508 }
1509
1510 return EqFailure(lhs_expression,
1511 rhs_expression,
1512 PrintToString(lhs),
1513 PrintToString(rhs),
1514 false);
1515}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperSTREQ() [2/2]

AssertionResult testing::internal::CmpHelperSTREQ ( const char * s1_expression,
const char * s2_expression,
const wchar_t * s1,
const wchar_t * s2 )

Definition at line 1884 of file gtest.cc.

1887 {
1888 if (String::WideCStringEquals(lhs, rhs)) {
1889 return AssertionSuccess();
1890 }
1891
1892 return EqFailure(lhs_expression,
1893 rhs_expression,
1894 PrintToString(lhs),
1895 PrintToString(rhs),
1896 false);
1897}
Here is the call graph for this function:

◆ CmpHelperSTRNE() [1/2]

AssertionResult testing::internal::CmpHelperSTRNE ( const char * s1_expression,
const char * s2_expression,
const char * s1,
const char * s2 )

Definition at line 1534 of file gtest.cc.

1537 {
1538 if (!String::CStringEquals(s1, s2)) {
1539 return AssertionSuccess();
1540 } else {
1541 return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
1542 << s2_expression << "), actual: \""
1543 << s1 << "\" vs \"" << s2 << "\"";
1544 }
1545}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmpHelperSTRNE() [2/2]

AssertionResult testing::internal::CmpHelperSTRNE ( const char * s1_expression,
const char * s2_expression,
const wchar_t * s1,
const wchar_t * s2 )

Definition at line 1900 of file gtest.cc.

1903 {
1904 if (!String::WideCStringEquals(s1, s2)) {
1905 return AssertionSuccess();
1906 }
1907
1908 return AssertionFailure() << "Expected: (" << s1_expression << ") != ("
1909 << s2_expression << "), actual: "
1910 << PrintToString(s1)
1911 << " vs " << PrintToString(s2);
1912}
Here is the call graph for this function:

◆ CodePointToUtf8()

std::string testing::internal::CodePointToUtf8 ( UInt32 code_point)

Definition at line 1774 of file gtest.cc.

1774 {
1775 if (code_point > kMaxCodePoint4) {
1776 return "(Invalid Unicode 0x" + String::FormatHexInt(code_point) + ")";
1777 }
1778
1779 char str[5]; // Big enough for the largest valid code point.
1780 if (code_point <= kMaxCodePoint1) {
1781 str[1] = '\0';
1782 str[0] = static_cast<char>(code_point); // 0xxxxxxx
1783 } else if (code_point <= kMaxCodePoint2) {
1784 str[2] = '\0';
1785 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
1786 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
1787 } else if (code_point <= kMaxCodePoint3) {
1788 str[3] = '\0';
1789 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
1790 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
1791 str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
1792 } else { // code_point <= kMaxCodePoint4
1793 str[4] = '\0';
1794 str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
1795 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
1796 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
1797 str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
1798 }
1799 return str;
1800}
return str
Definition CLI11.hpp:1359
UInt32 ChopLowBits(UInt32 *bits, int n)
Definition gtest.cc:1762
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConvertIdentifierNameToWords()

GTEST_API_ std::string testing::internal::ConvertIdentifierNameToWords ( const char * id_name)

Definition at line 73 of file gmock-internal-utils.cc.

73 {
74 std::string result;
75 char prev_char = '\0';
76 for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) {
77 // We don't care about the current locale as the input is
78 // guaranteed to be a valid C++ identifier name.
79 const bool starts_new_word = IsUpper(*p) ||
80 (!IsAlpha(prev_char) && IsLower(*p)) ||
81 (!IsDigit(prev_char) && IsDigit(*p));
82
83 if (IsAlNum(*p)) {
84 if (starts_new_word && result != "")
85 result += ' ';
86 result += ToLower(*p);
87 }
88 }
89 return result;
90}
const mie::Vuint & p
Definition bn.cpp:27
bool IsDigit(char ch)
bool IsAlNum(char ch)
bool IsUpper(char ch)
bool IsLower(char ch)
char ToLower(char ch)
bool IsAlpha(char ch)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyArray() [1/3]

template<typename T , typename U >
void testing::internal::CopyArray ( const T & from,
U * to )
inline

Definition at line 1040 of file gtest-internal.h.

1040{ *to = from; }

◆ CopyArray() [2/3]

template<typename T , typename U >
void testing::internal::CopyArray ( const T * from,
size_t size,
U * to )

Definition at line 1052 of file gtest-internal.h.

1052 {
1053 for (size_t i = 0; i != size; i++) {
1054 internal::CopyArray(from[i], to + i);
1055 }
1056}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyArray() [3/3]

template<typename T , typename U , size_t N>
void testing::internal::CopyArray ( const T(&) from[N],
U(*) to[N] )
inline

Definition at line 1044 of file gtest-internal.h.

1044 {
1045 internal::CopyArray(from, N, *to);
1046}
Here is the call graph for this function:

◆ CopyElements()

template<typename InputIterator , typename OutputIterator >
OutputIterator testing::internal::CopyElements ( InputIterator first,
InputIterator last,
OutputIterator output )
inline

Definition at line 98 of file gmock-more-actions.h.

100 {
101 for (; first != last; ++first, ++output) {
102 *output = *first;
103 }
104 return output;
105}
Here is the caller graph for this function:

◆ CountIf()

template<class Container , typename Predicate >
int testing::internal::CountIf ( const Container & c,
Predicate predicate )
inline

Definition at line 279 of file gtest-internal-inl.h.

279 {
280 // Implemented as an explicit loop since std::count_if() in libCstd on
281 // Solaris has a non-standard signature.
282 int count = 0;
283 for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
284 if (predicate(*it))
285 ++count;
286 }
287 return count;
288}
int * count
Here is the caller graph for this function:

◆ CreateCodePointFromUtf16SurrogatePair()

UInt32 testing::internal::CreateCodePointFromUtf16SurrogatePair ( wchar_t first,
wchar_t second )
inline

Definition at line 1815 of file gtest.cc.

1816 {
1817 const UInt32 mask = (1 << 10) - 1;
1818 return (sizeof(wchar_t) == 2) ?
1819 (((first & mask) << 10) | (second & mask)) + 0x10000 :
1820 // This function should not be called when the condition is
1821 // false, but we provide a sensible default in case it is.
1822 static_cast<UInt32>(first);
1823}
Here is the caller graph for this function:

◆ DefaultParamName()

template<class ParamType >
std::string testing::internal::DefaultParamName ( const TestParamInfo< ParamType > & info)

Definition at line 372 of file gtest-param-util.h.

372 {
373 Message name_stream;
374 name_stream << info.index;
375 return name_stream.GetString();
376}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DefaultPrintTo() [1/4]

template<typename C >
void testing::internal::DefaultPrintTo ( WrapPrinterType< kPrintContainer > ,
const C & container,
::std::ostream * os )

Definition at line 414 of file gtest-printers.h.

415 {
416 const size_t kMaxCount = 32; // The maximum number of elements to print.
417 *os << '{';
418 size_t count = 0;
419 for (typename C::const_iterator it = container.begin();
420 it != container.end(); ++it, ++count) {
421 if (count > 0) {
422 *os << ',';
423 if (count == kMaxCount) { // Enough has been printed.
424 *os << " ...";
425 break;
426 }
427 }
428 *os << ' ';
429 // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
430 // handle *it being a native array.
431 internal::UniversalPrint(*it, os);
432 }
433
434 if (count > 0) {
435 *os << ' ';
436 }
437 *os << '}';
438}
os_t os
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DefaultPrintTo() [2/4]

template<typename T >
void testing::internal::DefaultPrintTo ( WrapPrinterType< kPrintFunctionPointer > ,
T * p,
::std::ostream * os )

Definition at line 459 of file gtest-printers.h.

460 {
461 if (p == NULL) {
462 *os << "NULL";
463 } else {
464 // T is a function type, so '*os << p' doesn't do what we want
465 // (it just prints p as bool). We want to print p as a const
466 // void*.
468 }
469}

◆ DefaultPrintTo() [3/4]

template<typename T >
void testing::internal::DefaultPrintTo ( WrapPrinterType< kPrintOther > ,
const T & value,
::std::ostream * os )

Definition at line 474 of file gtest-printers.h.

475 {
477}
void DefaultPrintNonContainerTo(const T &value, ::std::ostream *os)
#define value
Definition pkcs11.h:157
Here is the call graph for this function:

◆ DefaultPrintTo() [4/4]

template<typename T >
void testing::internal::DefaultPrintTo ( WrapPrinterType< kPrintPointer > ,
T * p,
::std::ostream * os )

Definition at line 447 of file gtest-printers.h.

448 {
449 if (p == NULL) {
450 *os << "NULL";
451 } else {
452 // T is not a function type. We just call << to print p,
453 // relying on ADL to pick up user-defined << for their pointer
454 // types, if any.
455 *os << p;
456 }
457}

◆ DiffStrings()

GTEST_API_ std::string testing::internal::DiffStrings ( const std::string & left,
const std::string & right,
size_t * total_line_count )

◆ DoubleNearPredFormat()

AssertionResult testing::internal::DoubleNearPredFormat ( const char * expr1,
const char * expr2,
const char * abs_error_expr,
double val1,
double val2,
double abs_error )

Definition at line 1377 of file gtest.cc.

1382 {
1383 const double diff = fabs(val1 - val2);
1384 if (diff <= abs_error) return AssertionSuccess();
1385
1386 // TODO(wan): do not print the value of an expression if it's
1387 // already a literal.
1388 return AssertionFailure()
1389 << "The difference between " << expr1 << " and " << expr2
1390 << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n"
1391 << expr1 << " evaluates to " << val1 << ",\n"
1392 << expr2 << " evaluates to " << val2 << ", and\n"
1393 << abs_error_expr << " evaluates to " << abs_error << ".";
1394}
void diff(const std::string &a, const std::string &b)
Definition jmp.cpp:18
void fabs()
Here is the call graph for this function:

◆ DownCast_()

template<typename To , typename From >
To testing::internal::DownCast_ ( From * f)
inline

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

1485 { // so we only accept pointers
1486 // Ensures that To is a sub-type of From *. This test is here only
1487 // for compile-time type checking, and has no overhead in an
1488 // optimized build at run-time, as it will be optimized away
1489 // completely.
1491 if (false) {
1493 const To to = NULL;
1494 ::testing::internal::ImplicitCast_<From*>(to);
1495 }
1496
1497#if GTEST_HAS_RTTI
1498 // RTTI: debug mode only!
1499 GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
1500#endif
1501 return static_cast<To>(f);
1502}
#define GTEST_INTENTIONAL_CONST_COND_PUSH_()
Definition gtest-port.h:940
#define GTEST_INTENTIONAL_CONST_COND_POP_()
Definition gtest-port.h:942
if(ppFunctionList==NULL)
Here is the call graph for this function:

◆ EqFailure()

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 )

Definition at line 1326 of file gtest.cc.

1330 {
1331 Message msg;
1332 msg << "Expected equality of these values:";
1333 msg << "\n " << lhs_expression;
1334 if (lhs_value != lhs_expression) {
1335 msg << "\n Which is: " << lhs_value;
1336 }
1337 msg << "\n " << rhs_expression;
1338 if (rhs_value != rhs_expression) {
1339 msg << "\n Which is: " << rhs_value;
1340 }
1341
1342 if (ignoring_case) {
1343 msg << "\nIgnoring case";
1344 }
1345
1346 if (!lhs_value.empty() && !rhs_value.empty()) {
1347 const std::vector<std::string> lhs_lines =
1348 SplitEscapedString(lhs_value);
1349 const std::vector<std::string> rhs_lines =
1350 SplitEscapedString(rhs_value);
1351 if (lhs_lines.size() > 1 || rhs_lines.size() > 1) {
1352 msg << "\nWith diff:\n"
1353 << edit_distance::CreateUnifiedDiff(lhs_lines, rhs_lines);
1354 }
1355 }
1356
1357 return AssertionFailure() << msg;
1358}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Expect() [1/2]

void testing::internal::Expect ( bool condition,
const char * file,
int line )
inline

Definition at line 314 of file gmock-internal-utils.h.

314 {
315 Expect(condition, file, line, "Expectation failed.");
316}
void Expect(bool condition, const char *file, int line, const std::string &msg)
Here is the call graph for this function:

◆ Expect() [2/2]

void testing::internal::Expect ( bool condition,
const char * file,
int line,
const std::string & msg )
inline

Definition at line 307 of file gmock-internal-utils.h.

308 {
309 if (!condition) {
310 GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal,
311 file, line, msg);
312 }
313}
GTEST_API_ FailureReporterInterface * GetFailureReporter()
Here is the caller graph for this function:

◆ ExplainMatchFailureTupleTo()

template<typename MatcherTuple , typename ValueTuple >
void testing::internal::ExplainMatchFailureTupleTo ( const MatcherTuple & matchers,
const ValueTuple & values,
::std::ostream * os )

Definition at line 977 of file gmock-matchers.h.

979 {
980 TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
981 matchers, values, os);
982}

◆ FindMaxBipartiteMatching()

GTEST_API_ ElementMatcherPairs testing::internal::FindMaxBipartiteMatching ( const MatchMatrix & g)

Definition at line 339 of file gmock-matchers.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FloatingPointLE()

template<typename RawType >
AssertionResult testing::internal::FloatingPointLE ( const char * expr1,
const char * expr2,
RawType val1,
RawType val2 )

Definition at line 1399 of file gtest.cc.

1402 {
1403 // Returns success if val1 is less than val2,
1404 if (val1 < val2) {
1405 return AssertionSuccess();
1406 }
1407
1408 // or if val1 is almost equal to val2.
1409 const FloatingPoint<RawType> lhs(val1), rhs(val2);
1410 if (lhs.AlmostEquals(rhs)) {
1411 return AssertionSuccess();
1412 }
1413
1414 // Note that the above two checks will both fail if either val1 or
1415 // val2 is NaN, as the IEEE floating-point standard requires that
1416 // any predicate involving a NaN must return false.
1417
1418 ::std::stringstream val1_ss;
1419 val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
1420 << val1;
1421
1422 ::std::stringstream val2_ss;
1423 val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
1424 << val2;
1425
1426 return AssertionFailure()
1427 << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n"
1428 << " Actual: " << StringStreamToString(&val1_ss) << " vs "
1429 << StringStreamToString(&val2_ss);
1430}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FlushInfoLog()

void testing::internal::FlushInfoLog ( )
inline

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

1348{ fflush(NULL); }

◆ ForEach()

template<class Container , typename Functor >
void testing::internal::ForEach ( const Container & c,
Functor functor )

Definition at line 292 of file gtest-internal-inl.h.

292 {
293 std::for_each(c.begin(), c.end(), functor);
294}
Here is the caller graph for this function:

◆ FormatCompilerIndependentFileLocation()

GTEST_API_::std::string testing::internal::FormatCompilerIndependentFileLocation ( const char * file,
int line )

Definition at line 914 of file gtest-port.cc.

915 {
916 const std::string file_name(file == NULL ? kUnknownFile : file);
917
918 if (line < 0)
919 return file_name;
920 else
921 return file_name + ":" + StreamableToString(line);
922}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FormatEpochTimeInMillisAsIso8601()

std::string testing::internal::FormatEpochTimeInMillisAsIso8601 ( TimeInMillis ms)

Definition at line 3617 of file gtest.cc.

3617 {
3618 struct tm time_struct;
3619 if (!PortableLocaltime(static_cast<time_t>(ms / 1000), &time_struct))
3620 return "";
3621 // YYYY-MM-DDThh:mm:ss
3622 return StreamableToString(time_struct.tm_year + 1900) + "-" +
3623 String::FormatIntWidth2(time_struct.tm_mon + 1) + "-" +
3624 String::FormatIntWidth2(time_struct.tm_mday) + "T" +
3625 String::FormatIntWidth2(time_struct.tm_hour) + ":" +
3626 String::FormatIntWidth2(time_struct.tm_min) + ":" +
3627 String::FormatIntWidth2(time_struct.tm_sec);
3628}
Here is the call graph for this function:

◆ FormatFileLocation()

GTEST_API_::std::string testing::internal::FormatFileLocation ( const char * file,
int line )

Definition at line 896 of file gtest-port.cc.

896 {
897 const std::string file_name(file == NULL ? kUnknownFile : file);
898
899 if (line < 0) {
900 return file_name + ":";
901 }
902#ifdef _MSC_VER
903 return file_name + "(" + StreamableToString(line) + "):";
904#else
905 return file_name + ":" + StreamableToString(line) + ":";
906#endif // _MSC_VER
907}
Here is the caller graph for this function:

◆ FormatForComparisonFailureMessage()

template<typename T1 , typename T2 >
std::string testing::internal::FormatForComparisonFailureMessage ( const T1 & value,
const T2 &  )

Definition at line 385 of file gtest-printers.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FormatMatcherDescription()

GTEST_API_ std::string testing::internal::FormatMatcherDescription ( bool negation,
const char * matcher_name,
const Strings & param_values )

Definition at line 163 of file gmock-matchers.cc.

165 {
166 std::string result = ConvertIdentifierNameToWords(matcher_name);
167 if (param_values.size() >= 1) result += " " + JoinAsTuple(param_values);
168 return negation ? "not (" + result + ")" : result;
169}
GTEST_API_ std::string ConvertIdentifierNameToWords(const char *id_name)
GTEST_API_ std::string JoinAsTuple(const Strings &fields)
Here is the call graph for this function:

◆ FormatTimeInMillisAsSeconds()

std::string testing::internal::FormatTimeInMillisAsSeconds ( TimeInMillis ms)

Definition at line 3593 of file gtest.cc.

3593 {
3594 ::std::stringstream ss;
3595 ss << (static_cast<double>(ms) * 1e-3);
3596 return ss.str();
3597}

◆ GetArgvs()

std::vector< std::string > testing::internal::GetArgvs ( )

Definition at line 398 of file gtest.cc.

398 {
399#if defined(GTEST_CUSTOM_GET_ARGVS_)
400 // GTEST_CUSTOM_GET_ARGVS_() may return a container of std::string or
401 // ::string. This code converts it to the appropriate type.
402 const auto& custom = GTEST_CUSTOM_GET_ARGVS_();
403 return ::std::vector<std::string>(custom.begin(), custom.end());
404#else // defined(GTEST_CUSTOM_GET_ARGVS_)
405 return g_argvs;
406#endif // defined(GTEST_CUSTOM_GET_ARGVS_)
407}
::std::vector< std::string > g_argvs
Definition gtest.cc:396
Here is the caller graph for this function:

◆ GetBoolAssertionFailureMessage()

std::string testing::internal::GetBoolAssertionFailureMessage ( const AssertionResult & assertion_result,
const char * expression_text,
const char * actual_predicate_value,
const char * expected_predicate_value )

Definition at line 1361 of file gtest.cc.

1365 {
1366 const char* actual_message = assertion_result.message();
1367 Message msg;
1368 msg << "Value of: " << expression_text
1369 << "\n Actual: " << actual_predicate_value;
1370 if (actual_message[0] != '\0')
1371 msg << " (" << actual_message << ")";
1372 msg << "\nExpected: " << expected_predicate_value;
1373 return msg.GetString();
1374}
const char * message() const
Definition gtest.h:314
Here is the call graph for this function:

◆ GetCapturedStderr()

GTEST_API_ std::string testing::internal::GetCapturedStderr ( )
Here is the caller graph for this function:

◆ GetCapturedStdout()

GTEST_API_ std::string testing::internal::GetCapturedStdout ( )
Here is the caller graph for this function:

◆ GetCurrentExecutableName()

FilePath testing::internal::GetCurrentExecutableName ( )

Definition at line 411 of file gtest.cc.

411 {
412 FilePath result;
413
414#if GTEST_OS_WINDOWS
415 result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
416#else
417 result.Set(FilePath(GetArgvs()[0]));
418#endif // GTEST_OS_WINDOWS
419
420 return result.RemoveDirectoryName();
421}
GTEST_API_ std::vector< std::string > GetArgvs()
Definition gtest.cc:398
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentOsStackTraceExceptTop()

std::string testing::internal::GetCurrentOsStackTraceExceptTop ( UnitTest * unit_test,
int skip_count )

Definition at line 5391 of file gtest.cc.

5392 {
5393 // We pass skip_count + 1 to skip this wrapper function in addition
5394 // to what the user really wants to skip.
5395 return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1);
5396}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElementOr()

template<typename E >
E testing::internal::GetElementOr ( const std::vector< E > & v,
int i,
E default_value )
inline

Definition at line 299 of file gtest-internal-inl.h.

299 {
300 return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];
301}

◆ GetFailureReporter()

GTEST_API_ FailureReporterInterface * testing::internal::GetFailureReporter ( )

Definition at line 113 of file gmock-internal-utils.cc.

113 {
114 // Points to the global failure reporter used by Google Mock. gcc
115 // guarantees that the following use of failure_reporter is
116 // thread-safe. We may need to add additional synchronization to
117 // protect failure_reporter if we port Google Mock to other
118 // compilers.
119 static FailureReporterInterface* const failure_reporter =
121 return failure_reporter;
122}

◆ GetFileSize()

size_t testing::internal::GetFileSize ( FILE * file)

Definition at line 1080 of file gtest-port.cc.

1080 {
1081 fseek(file, 0, SEEK_END);
1082 return static_cast<size_t>(ftell(file));
1083}
Here is the caller graph for this function:

◆ GetNextRandomSeed()

int testing::internal::GetNextRandomSeed ( int seed)
inline

Definition at line 145 of file gtest-internal-inl.h.

145 {
146 GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
147 << "Invalid random seed " << seed << " - must be in [1, "
148 << kMaxRandomSeed << "].";
149 const int next_seed = seed + 1;
150 return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
151}
Here is the caller graph for this function:

◆ GetParamNameGen() [1/2]

template<class ParamType >
ParamNameGenFunc< ParamType >::Type * testing::internal::GetParamNameGen ( )

Definition at line 394 of file gtest-param-util.h.

394 {
395 return DefaultParamName;
396}
std::string DefaultParamName(const TestParamInfo< ParamType > &info)
Here is the call graph for this function:

◆ GetParamNameGen() [2/2]

template<class ParamType , class ParamNameGenFunctor >
ParamNameGenFunctor testing::internal::GetParamNameGen ( ParamNameGenFunctor func)

Definition at line 384 of file gtest-param-util.h.

384 {
385 return func;
386}

◆ GetRandomSeedFromFlag()

int testing::internal::GetRandomSeedFromFlag ( Int32 random_seed_flag)
inline

Definition at line 129 of file gtest-internal-inl.h.

129 {
130 const unsigned int raw_seed = (random_seed_flag == 0) ?
131 static_cast<unsigned int>(GetTimeInMillis()) :
132 static_cast<unsigned int>(random_seed_flag);
133
134 // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
135 // it's easy to type.
136 const int normalized_seed =
137 static_cast<int>((raw_seed - 1U) %
138 static_cast<unsigned int>(kMaxRandomSeed)) + 1;
139 return normalized_seed;
140}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRawPointer() [1/2]

template<typename Pointer >
const Pointer::element_type * testing::internal::GetRawPointer ( const Pointer & p)
inline

Definition at line 87 of file gmock-internal-utils.h.

87 {
88 return p.get();
89}
Here is the caller graph for this function:

◆ GetRawPointer() [2/2]

template<typename Element >
Element * testing::internal::GetRawPointer ( Element * p)
inline

Definition at line 92 of file gmock-internal-utils.h.

92{ return p; }

◆ GetTestTypeId()

TypeId testing::internal::GetTestTypeId ( )

Definition at line 637 of file gtest.cc.

637 {
638 return GetTypeId<Test>();
639}
Here is the call graph for this function:

◆ GetThreadCount()

size_t testing::internal::GetThreadCount ( )

Definition at line 185 of file gtest-port.cc.

185 {
186 // There's no portable way to detect the number of threads, so we just
187 // return 0 to indicate that we cannot detect it.
188 return 0;
189}
Here is the caller graph for this function:

◆ GetTimeInMillis()

TimeInMillis testing::internal::GetTimeInMillis ( )

Definition at line 820 of file gtest.cc.

820 {
821#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__)
822 // Difference between 1970-01-01 and 1601-01-01 in milliseconds.
823 // http://analogous.blogspot.com/2005/04/epoch.html
824 const TimeInMillis kJavaEpochToWinFileTimeDelta =
825 static_cast<TimeInMillis>(116444736UL) * 100000UL;
826 const DWORD kTenthMicrosInMilliSecond = 10000;
827
828 SYSTEMTIME now_systime;
829 FILETIME now_filetime;
830 ULARGE_INTEGER now_int64;
831 // TODO(kenton@google.com): Shouldn't this just use
832 // GetSystemTimeAsFileTime()?
833 GetSystemTime(&now_systime);
834 if (SystemTimeToFileTime(&now_systime, &now_filetime)) {
835 now_int64.LowPart = now_filetime.dwLowDateTime;
836 now_int64.HighPart = now_filetime.dwHighDateTime;
837 now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) -
838 kJavaEpochToWinFileTimeDelta;
839 return now_int64.QuadPart;
840 }
841 return 0;
842#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_
843 __timeb64 now;
844
845 // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996
846 // (deprecated function) there.
847 // TODO(kenton@google.com): Use GetTickCount()? Or use
848 // SystemTimeToFileTime()
850 _ftime64(&now);
852
853 return static_cast<TimeInMillis>(now.time) * 1000 + now.millitm;
854#elif GTEST_HAS_GETTIMEOFDAY_
855 struct timeval now;
856 gettimeofday(&now, NULL);
857 return static_cast<TimeInMillis>(now.tv_sec) * 1000 + now.tv_usec / 1000;
858#else
859# error "Don't know how to get the current time on your system."
860#endif
861}
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
Definition gtest-port.h:324
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
Definition gtest-port.h:325
return
TypeWithSize< 8 >::Int TimeInMillis
internal::TimeInMillis TimeInMillis
Definition gtest.h:506
Here is the caller graph for this function:

◆ GetTypeId()

template<typename T >
TypeId testing::internal::GetTypeId ( )

Definition at line 429 of file gtest-internal.h.

429 {
430 // The compiler is required to allocate a different
431 // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
432 // the template. Therefore, the address of dummy_ is guaranteed to
433 // be unique.
434 return &(TypeIdHelper<T>::dummy_);
435}
Here is the caller graph for this function:

◆ GetTypeName()

template<typename T >
std::string testing::internal::GetTypeName ( )

Definition at line 80 of file gtest-type-util.h.

80 {
81# if GTEST_HAS_RTTI
82
83 const char* const name = typeid(T).name();
84# if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
85 int status = 0;
86 // gcc's implementation of typeid(T).name() mangles the type name,
87 // so we have to demangle it.
88# if GTEST_HAS_CXXABI_H_
89 using abi::__cxa_demangle;
90# endif // GTEST_HAS_CXXABI_H_
91 char* const readable_name = __cxa_demangle(name, 0, 0, &status);
92 const std::string name_str(status == 0 ? readable_name : name);
93 free(readable_name);
94 return CanonicalizeForStdLibVersioning(name_str);
95# else
96 return name;
97# endif // GTEST_HAS_CXXABI_H_ || __HP_aCC
98
99# else
100
101 return "<type>";
102
103# endif // GTEST_HAS_RTTI
104}
std::string name
std::string CanonicalizeForStdLibVersioning(std::string s)
#define T(meth, val, expected)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUnitTestImpl()

UnitTestImpl * testing::internal::GetUnitTestImpl ( )
inline

Definition at line 919 of file gtest-internal-inl.h.

919 {
920 return UnitTest::GetInstance()->impl();
921}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWithoutMatchers()

GTEST_API_ WithoutMatchers testing::internal::GetWithoutMatchers ( )

◆ GMOCK_DECLARE_KIND_() [1/16]

testing::internal::GMOCK_DECLARE_KIND_ ( bool ,
kBool  )

◆ GMOCK_DECLARE_KIND_() [2/16]

testing::internal::GMOCK_DECLARE_KIND_ ( char ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [3/16]

testing::internal::GMOCK_DECLARE_KIND_ ( double ,
kFloatingPoint  )

◆ GMOCK_DECLARE_KIND_() [4/16]

testing::internal::GMOCK_DECLARE_KIND_ ( float ,
kFloatingPoint  )

◆ GMOCK_DECLARE_KIND_() [5/16]

testing::internal::GMOCK_DECLARE_KIND_ ( int ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [6/16]

testing::internal::GMOCK_DECLARE_KIND_ ( Int64 ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [7/16]

testing::internal::GMOCK_DECLARE_KIND_ ( long double ,
kFloatingPoint  )

◆ GMOCK_DECLARE_KIND_() [8/16]

testing::internal::GMOCK_DECLARE_KIND_ ( long ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [9/16]

testing::internal::GMOCK_DECLARE_KIND_ ( short ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [10/16]

testing::internal::GMOCK_DECLARE_KIND_ ( signed char ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [11/16]

testing::internal::GMOCK_DECLARE_KIND_ ( UInt64 ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [12/16]

testing::internal::GMOCK_DECLARE_KIND_ ( unsigned char ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [13/16]

testing::internal::GMOCK_DECLARE_KIND_ ( unsigned int ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [14/16]

testing::internal::GMOCK_DECLARE_KIND_ ( unsigned long ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [15/16]

testing::internal::GMOCK_DECLARE_KIND_ ( unsigned short ,
kInteger  )

◆ GMOCK_DECLARE_KIND_() [16/16]

testing::internal::GMOCK_DECLARE_KIND_ ( wchar_t ,
kInteger  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [1/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( ::std::string ,
""  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [2/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( bool ,
false  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [3/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( char ,
'\0'  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [4/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( double ,
0  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [5/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( float ,
0  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [6/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( Int64 ,
0  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [7/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( signed char ,
'\0'  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [8/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( signed int ,
0  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [9/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( signed long ,
0L  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [10/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( signed short ,
0  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [11/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( UInt64 ,
0  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [12/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( unsigned char ,
'\0'  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [13/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( unsigned int ,
0U  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [14/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( unsigned long ,
0UL  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [15/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( unsigned short ,
0U  )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [16/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( void )

◆ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_() [17/17]

testing::internal::GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ ( wchar_t ,
0U  )

◆ GTEST_ADD_REFERENCE_()

template<typename T >
testing::internal::GTEST_ADD_REFERENCE_ ( T )

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

1432{ return t; }

◆ GTEST_DECLARE_STATIC_MUTEX_() [1/2]

GTEST_API_ testing::internal::GTEST_DECLARE_STATIC_MUTEX_ ( g_gmock_mutex )

◆ GTEST_DECLARE_STATIC_MUTEX_() [2/2]

GTEST_API_ testing::internal::GTEST_DECLARE_STATIC_MUTEX_ ( g_linked_ptr_mutex )

◆ GTEST_DECLARE_string_()

testing::internal::GTEST_DECLARE_string_ ( internal_run_death_test )

◆ GTEST_DEFINE_STATIC_MUTEX_() [1/2]

GTEST_API_ testing::internal::GTEST_DEFINE_STATIC_MUTEX_ ( g_gmock_mutex )

◆ GTEST_DEFINE_STATIC_MUTEX_() [2/2]

GTEST_API_ testing::internal::GTEST_DEFINE_STATIC_MUTEX_ ( g_linked_ptr_mutex )

◆ GTEST_DEFINE_string_()

testing::internal::GTEST_DEFINE_string_ ( internal_run_death_test ,
"" ,
"Indicates the file,
line number,
temporal index of " "the single death test to run,
and a file descriptor to " "which a success code may be sent,
all separated by " "the '|' characters. This flag is specified if and only if the current " "process is a sub-process launched for running a thread-safe " "death test. FOR INTERNAL USE ONLY."  )

◆ GTEST_IMPL_CMP_HELPER_() [1/5]

testing::internal::GTEST_IMPL_CMP_HELPER_ ( GE ,
>=  )

◆ GTEST_IMPL_CMP_HELPER_() [2/5]

testing::internal::GTEST_IMPL_CMP_HELPER_ ( GT )
Here is the call graph for this function:

◆ GTEST_IMPL_CMP_HELPER_() [3/5]

testing::internal::GTEST_IMPL_CMP_HELPER_ ( LE ,
<=  )

◆ GTEST_IMPL_CMP_HELPER_() [4/5]

testing::internal::GTEST_IMPL_CMP_HELPER_ ( LT )

◆ GTEST_IMPL_CMP_HELPER_() [5/5]

testing::internal::GTEST_IMPL_CMP_HELPER_ ( NE ,
!  )

◆ GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_() [1/2]

testing::internal::GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ ( char )

◆ GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_() [2/2]

testing::internal::GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ ( wchar_t )

◆ GTEST_IMPL_FORMAT_C_STRING_AS_STRING_()

testing::internal::GTEST_IMPL_FORMAT_C_STRING_AS_STRING_ ( char ,
::std::string  )

◆ HandleExceptionsInMethodIfSupported()

template<class T , typename Result >
Result testing::internal::HandleExceptionsInMethodIfSupported ( T * object,
Result(T::* method )(),
const char * location )

Definition at line 2426 of file gtest.cc.

2427 {
2428 // NOTE: The user code can affect the way in which Google Test handles
2429 // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
2430 // RUN_ALL_TESTS() starts. It is technically possible to check the flag
2431 // after the exception is caught and either report or re-throw the
2432 // exception based on the flag's value:
2433 //
2434 // try {
2435 // // Perform the test method.
2436 // } catch (...) {
2437 // if (GTEST_FLAG(catch_exceptions))
2438 // // Report the exception as failure.
2439 // else
2440 // throw; // Re-throws the original exception.
2441 // }
2442 //
2443 // However, the purpose of this flag is to allow the program to drop into
2444 // the debugger when the exception is thrown. On most platforms, once the
2445 // control enters the catch block, the exception origin information is
2446 // lost and the debugger will stop the program at the point of the
2447 // re-throw in this function -- instead of at the point of the original
2448 // throw statement in the code under test. For this reason, we perform
2449 // the check early, sacrificing the ability to affect Google Test's
2450 // exception handling in the method where the exception is thrown.
2451 if (internal::GetUnitTestImpl()->catch_exceptions()) {
2452#if GTEST_HAS_EXCEPTIONS
2453 try {
2454 return HandleSehExceptionsInMethodIfSupported(object, method, location);
2455 } catch (const AssertionException&) { // NOLINT
2456 // This failure was reported already.
2457 } catch (const internal::GoogleTestFailureException&) { // NOLINT
2458 // This exception type can only be thrown by a failed Google
2459 // Test assertion with the intention of letting another testing
2460 // framework catch it. Therefore we just re-throw it.
2461 throw;
2462 } catch (const std::exception& e) { // NOLINT
2463 internal::ReportFailureInUnknownLocation(
2464 TestPartResult::kFatalFailure,
2465 FormatCxxExceptionMessage(e.what(), location));
2466 } catch (...) { // NOLINT
2467 internal::ReportFailureInUnknownLocation(
2468 TestPartResult::kFatalFailure,
2469 FormatCxxExceptionMessage(NULL, location));
2470 }
2471 return static_cast<Result>(0);
2472#else
2473 return HandleSehExceptionsInMethodIfSupported(object, method, location);
2474#endif // GTEST_HAS_EXCEPTIONS
2475 } else {
2476 return (object->*method)();
2477 }
2478}
Result HandleSehExceptionsInMethodIfSupported(T *object, Result(T::*method)(), const char *location)
Definition gtest.cc:2399
yh_object_descriptor object
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleSehExceptionsInMethodIfSupported()

template<class T , typename Result >
Result testing::internal::HandleSehExceptionsInMethodIfSupported ( T * object,
Result(T::* method )(),
const char * location )

Definition at line 2399 of file gtest.cc.

2400 {
2401#if GTEST_HAS_SEH
2402 __try {
2403 return (object->*method)();
2404 } __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT
2405 GetExceptionCode())) {
2406 // We create the exception message on the heap because VC++ prohibits
2407 // creation of objects with destructors on stack in functions using __try
2408 // (see error C2712).
2409 std::string* exception_message = FormatSehExceptionMessage(
2410 GetExceptionCode(), location);
2411 internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,
2412 *exception_message);
2413 delete exception_message;
2414 return static_cast<Result>(0);
2415 }
2416#else
2417 (void)location;
2418 return (object->*method)();
2419#endif // GTEST_HAS_SEH
2420}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IllegalDoDefault()

GTEST_API_ void testing::internal::IllegalDoDefault ( const char * file,
int line )

Definition at line 193 of file gmock-internal-utils.cc.

193 {
194 internal::Assert(
195 false, file, line,
196 "You are using DoDefault() inside a composite action like "
197 "DoAll() or WithArgs(). This is not supported for technical "
198 "reasons. Please instead spell out the default action, or "
199 "assign the default action to an Action variable and use "
200 "the variable in various places.");
201}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ImplicitCast_()

template<typename To >
To testing::internal::ImplicitCast_ ( To x)
inline

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

1461{ return x; }

◆ InitGoogleMockImpl()

template<typename CharType >
void testing::internal::InitGoogleMockImpl ( int * argc,
CharType ** argv )

Definition at line 148 of file gmock.cc.

148 {
149 // Makes sure Google Test is initialized. InitGoogleTest() is
150 // idempotent, so it's fine if the user has already called it.
151 InitGoogleTest(argc, argv);
152 if (*argc <= 0) return;
153
154 for (int i = 1; i != *argc; i++) {
155 const std::string arg_string = StreamableToString(argv[i]);
156 const char* const arg = arg_string.c_str();
157
158 // Do we see a Google Mock flag?
159 if (ParseGoogleMockBoolFlag(arg, "catch_leaked_mocks",
160 &GMOCK_FLAG(catch_leaked_mocks)) ||
161 ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose)) ||
162 ParseGoogleMockIntFlag(arg, "default_mock_behavior",
163 &GMOCK_FLAG(default_mock_behavior))) {
164 // Yes. Shift the remainder of the argv list left by one. Note
165 // that argv has (*argc + 1) elements, the last one always being
166 // NULL. The following loop moves the trailing NULL element as
167 // well.
168 for (int j = i; j != *argc; j++) {
169 argv[j] = argv[j + 1];
170 }
171
172 // Decrements the argument count.
173 (*argc)--;
174
175 // We also need to decrement the iterator as we just removed
176 // an element.
177 i--;
178 }
179 }
180}
#define GMOCK_FLAG(name)
Definition gmock-port.h:66
char ** argv
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition gtest.cc:5787
uint16_t j
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitGoogleTestImpl()

template<typename CharType >
void testing::internal::InitGoogleTestImpl ( int * argc,
CharType ** argv )

Definition at line 5761 of file gtest.cc.

5761 {
5762 // We don't want to run the initialization code twice.
5763 if (GTestIsInitialized()) return;
5764
5765 if (*argc <= 0) return;
5766
5767 g_argvs.clear();
5768 for (int i = 0; i != *argc; i++) {
5769 g_argvs.push_back(StreamableToString(argv[i]));
5770 }
5771
5772 ParseGoogleTestFlagsOnly(argc, argv);
5773 GetUnitTestImpl()->PostFlagParsingInit();
5774}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Int32FromEnvOrDie()

Int32 testing::internal::Int32FromEnvOrDie ( const char * env_var,
Int32 default_val )

Definition at line 5173 of file gtest.cc.

5173 {
5174 const char* str_val = posix::GetEnv(var);
5175 if (str_val == NULL) {
5176 return default_val;
5177 }
5178
5179 Int32 result;
5180 if (!ParseInt32(Message() << "The value of environment variable " << var,
5181 str_val, &result)) {
5182 exit(EXIT_FAILURE);
5183 }
5184 return result;
5185}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Int32FromGTestEnv()

Int32 testing::internal::Int32FromGTestEnv ( const char * flag,
Int32 default_val )

Definition at line 1223 of file gtest-port.cc.

1223 {
1224#if defined(GTEST_GET_INT32_FROM_ENV_)
1225 return GTEST_GET_INT32_FROM_ENV_(flag, default_value);
1226#else
1227 const std::string env_var = FlagToEnvVar(flag);
1228 const char* const string_value = posix::GetEnv(env_var.c_str());
1229 if (string_value == NULL) {
1230 // The environment variable is not set.
1231 return default_value;
1232 }
1233
1234 Int32 result = default_value;
1235 if (!ParseInt32(Message() << "Environment variable " << env_var,
1236 string_value, &result)) {
1237 printf("The default value %s is used.\n",
1238 (Message() << default_value).GetString().c_str());
1239 fflush(stdout);
1240 return default_value;
1241 }
1242
1243 return result;
1244#endif // defined(GTEST_GET_INT32_FROM_ENV_)
1245}
Here is the call graph for this function:

◆ intToCallReaction()

CallReaction testing::internal::intToCallReaction ( int mock_behavior)

Definition at line 552 of file gmock-spec-builders.cc.

552 {
553 if (mock_behavior >= kAllow && mock_behavior <= kFail) {
554 return static_cast<internal::CallReaction>(mock_behavior);
555 }
556 return kWarn;
557}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Invalid()

template<typename T >
T testing::internal::Invalid ( )
inline

Definition at line 404 of file gmock-internal-utils.h.

404 {
405 Assert(false, "", -1, "Internal error: attempt to return invalid value");
406 // This statement is unreachable, and would never terminate even if it
407 // could be reached. It is provided only to placate compiler warnings
408 // about missing return statements.
409 return Invalid<T>();
410}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAlNum()

bool testing::internal::IsAlNum ( char ch)
inline

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

2386 {
2387 return isalnum(static_cast<unsigned char>(ch)) != 0;
2388}
Here is the caller graph for this function:

◆ IsAlpha()

bool testing::internal::IsAlpha ( char ch)
inline

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

2383 {
2384 return isalpha(static_cast<unsigned char>(ch)) != 0;
2385}
Here is the caller graph for this function:

◆ IsContainerTest() [1/2]

template<class C >
IsContainer testing::internal::IsContainerTest ( int ,
typename C::iterator * = NULL,
typename C::const_iterator * = NULL )

Definition at line 904 of file gtest-internal.h.

906 {
907 return 0;
908}

◆ IsContainerTest() [2/2]

template<class C >
IsNotContainer testing::internal::IsContainerTest ( long )

Definition at line 913 of file gtest-internal.h.

913{ return '\0'; }

◆ IsDigit()

bool testing::internal::IsDigit ( char ch)
inline

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

2389 {
2390 return isdigit(static_cast<unsigned char>(ch)) != 0;
2391}
Here is the caller graph for this function:

◆ IsLower()

bool testing::internal::IsLower ( char ch)
inline

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

2392 {
2393 return islower(static_cast<unsigned char>(ch)) != 0;
2394}
Here is the caller graph for this function:

◆ IsNull()

AssertionResult testing::internal::IsNull ( const char * str)

Definition at line 140 of file gtest-unittest-api_test.cc.

140 {
141 if (str != NULL) {
142 return testing::AssertionFailure() << "argument is " << str;
143 }
144 return AssertionSuccess();
145}
GTEST_API_ AssertionResult AssertionFailure()
Definition gtest.cc:1029
Here is the call graph for this function:

◆ IsNullLiteralHelper() [1/2]

char(& testing::internal::IsNullLiteralHelper ( ...) )[2]

◆ IsNullLiteralHelper() [2/2]

char testing::internal::IsNullLiteralHelper ( Secret * p)

◆ IsPrintableAscii()

bool testing::internal::IsPrintableAscii ( wchar_t c)
inline

Definition at line 138 of file gtest-printers.cc.

138 {
139 return 0x20 <= c && c <= 0x7E;
140}

◆ IsReadableTypeName()

bool testing::internal::IsReadableTypeName ( const std::string & type_name)
inline

Definition at line 855 of file gmock-matchers.h.

855 {
856 // We consider a type name readable if it's short or doesn't contain
857 // a template or function type.
858 return (type_name.length() <= 20 ||
859 type_name.find_first_of("<(") == std::string::npos);
860}
Here is the caller graph for this function:

◆ IsSpace()

bool testing::internal::IsSpace ( char ch)
inline

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

2395 {
2396 return isspace(static_cast<unsigned char>(ch)) != 0;
2397}
Here is the caller graph for this function:

◆ IsTrue()

bool testing::internal::IsTrue ( bool condition)

Definition at line 5404 of file gtest.cc.

5404{ return condition; }
Here is the caller graph for this function:

◆ IsUpper()

bool testing::internal::IsUpper ( char ch)
inline

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

2398 {
2399 return isupper(static_cast<unsigned char>(ch)) != 0;
2400}
Here is the caller graph for this function:

◆ IsUtf16SurrogatePair()

bool testing::internal::IsUtf16SurrogatePair ( wchar_t first,
wchar_t second )
inline

Definition at line 1809 of file gtest.cc.

1809 {
1810 return sizeof(wchar_t) == 2 &&
1811 (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;
1812}
Here is the caller graph for this function:

◆ IsXDigit() [1/2]

bool testing::internal::IsXDigit ( char ch)
inline

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

2401 {
2402 return isxdigit(static_cast<unsigned char>(ch)) != 0;
2403}
Here is the caller graph for this function:

◆ IsXDigit() [2/2]

bool testing::internal::IsXDigit ( wchar_t ch)
inline

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

2404 {
2405 const unsigned char low_byte = static_cast<unsigned char>(ch);
2406 return ch == low_byte && isxdigit(low_byte) != 0;
2407}

◆ JoinAsTuple()

GTEST_API_ std::string testing::internal::JoinAsTuple ( const Strings & fields)

Definition at line 52 of file gmock-internal-utils.cc.

52 {
53 switch (fields.size()) {
54 case 0:
55 return "";
56 case 1:
57 return fields[0];
58 default:
59 std::string result = "(" + fields[0];
60 for (size_t i = 1; i < fields.size(); i++) {
61 result += ", ";
62 result += fields[i];
63 }
64 result += ")";
65 return result;
66 }
67}
Here is the caller graph for this function:

◆ Log()

GTEST_API_ void testing::internal::Log ( LogSeverity severity,
const std::string & message,
int stack_frames_to_skip )

Definition at line 150 of file gmock-internal-utils.cc.

151 {
152 if (!LogIsVisible(severity))
153 return;
154
155 // Ensures that logs from different threads don't interleave.
156 MutexLock l(&g_log_mutex);
157
158 // "using ::std::cout;" doesn't work with Symbian's STLport, where cout is a
159 // macro.
160
161 if (severity == kWarning) {
162 // Prints a GMOCK WARNING marker to make the warnings easily searchable.
163 std::cout << "\nGMOCK WARNING:";
164 }
165 // Pre-pends a new-line to message if it doesn't start with one.
166 if (message.empty() || message[0] != '\n') {
167 std::cout << "\n";
168 }
169 std::cout << message;
170 if (stack_frames_to_skip >= 0) {
171#ifdef NDEBUG
172 // In opt mode, we have to be conservative and skip no stack frame.
173 const int actual_to_skip = 0;
174#else
175 // In dbg mode, we can do what the caller tell us to do (plus one
176 // for skipping this function's stack frame).
177 const int actual_to_skip = stack_frames_to_skip + 1;
178#endif // NDEBUG
179
180 // Appends a new-line to message if it doesn't end with one.
181 if (!message.empty() && *message.rbegin() != '\n') {
182 std::cout << "\n";
183 }
184 std::cout << "Stack trace:\n"
186 ::testing::UnitTest::GetInstance(), actual_to_skip);
187 }
188 std::cout << ::std::flush;
189}
static UnitTest * GetInstance()
Definition gtest.cc:4374
GTEST_API_ bool LogIsVisible(LogSeverity severity)
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(UnitTest *unit_test, int skip_count)
Definition gtest.cc:5391
int l
Here is the call graph for this function:

◆ LogIsVisible()

GTEST_API_ bool testing::internal::LogIsVisible ( LogSeverity severity)

Definition at line 129 of file gmock-internal-utils.cc.

129 {
130 if (GMOCK_FLAG(verbose) == kInfoVerbosity) {
131 // Always show the log if --gmock_verbose=info.
132 return true;
133 } else if (GMOCK_FLAG(verbose) == kErrorVerbosity) {
134 // Always hide it if --gmock_verbose=error.
135 return false;
136 } else {
137 // If --gmock_verbose is neither "info" nor "error", we treat it
138 // as "warning" (its default value).
139 return severity == kWarning;
140 }
141}
Here is the caller graph for this function:

◆ LogToStderr()

void testing::internal::LogToStderr ( )
inline

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

1347{}

◆ LogWithLocation()

GTEST_API_ void testing::internal::LogWithLocation ( testing::internal::LogSeverity severity,
const char * file,
int line,
const std::string & message )

Definition at line 69 of file gmock-spec-builders.cc.

71 {
72 ::std::ostringstream s;
73 s << file << ":" << line << ": " << message << ::std::endl;
74 Log(severity, s.str(), 0);
75}
Definition Logging.h:12
Here is the caller graph for this function:

◆ make_linked_ptr()

template<typename T >
linked_ptr< T > testing::internal::make_linked_ptr ( T * ptr)

Definition at line 236 of file gtest-linked_ptr.h.

◆ MakeAndRegisterTestInfo()

TestInfo * testing::internal::MakeAndRegisterTestInfo ( const char * test_case_name,
const char * name,
const char * type_param,
const char * value_param,
CodeLocation code_location,
TypeId fixture_class_id,
SetUpTestCaseFunc set_up_tc,
TearDownTestCaseFunc tear_down_tc,
TestFactoryBase * factory )

Definition at line 2561 of file gtest.cc.

2570 {
2571 TestInfo* const test_info =
2572 new TestInfo(test_case_name, name, type_param, value_param,
2573 code_location, fixture_class_id, factory);
2574 GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);
2575 return test_info;
2576}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakePredicateFormatterFromMatcher()

template<typename M >
PredicateFormatterFromMatcher< M > testing::internal::MakePredicateFormatterFromMatcher ( M matcher)
inline

Definition at line 2075 of file gmock-matchers.h.

Here is the call graph for this function:

◆ MatcherBindSecond()

template<typename Tuple2Matcher , typename Second >
BoundSecondMatcher< Tuple2Matcher, Second > testing::internal::MatcherBindSecond ( const Tuple2Matcher & tm,
const Second & second )

Definition at line 3985 of file gmock-matchers.h.

Here is the caller graph for this function:

◆ MatchPrintAndExplain()

template<typename Value , typename T >
bool testing::internal::MatchPrintAndExplain ( Value & value,
const Matcher< T > & matcher,
MatchResultListener * listener )

Definition at line 868 of file gmock-matchers.h.

869 {
870 if (!listener->IsInterested()) {
871 // If the listener is not interested, we do not need to construct the
872 // inner explanation.
873 return matcher.Matches(value);
874 }
875
876 StringMatchResultListener inner_listener;
877 const bool match = matcher.MatchAndExplain(value, &inner_listener);
878
879 UniversalPrint(value, listener->stream());
880#if GTEST_HAS_RTTI
881 const std::string& type_name = GetTypeName<Value>();
882 if (IsReadableTypeName(type_name))
883 *listener->stream() << " (of type " << type_name << ")";
884#endif
885 PrintIfNotEmpty(inner_listener.str(), listener->stream());
886
887 return match;
888}
bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, MatchResultListener *listener) const
bool Matches(GTEST_REFERENCE_TO_CONST_(T) x) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ move()

template<typename T >
const T & testing::internal::move ( const T & t)

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

1428 {
1429 return t;
1430}
Here is the caller graph for this function:

◆ operator!=()

template<typename T >
bool testing::internal::operator!= ( T * ptr,
const linked_ptr< T > & x )
inline

Definition at line 228 of file gtest-linked_ptr.h.

228 {
229 return ptr != x.get();
230}
Here is the call graph for this function:

◆ operator==()

template<typename T >
bool testing::internal::operator== ( T * ptr,
const linked_ptr< T > & x )
inline

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

223 {
224 return ptr == x.get();
225}
Here is the call graph for this function:

◆ OutputFlagAlsoCheckEnvVar()

std::string testing::internal::OutputFlagAlsoCheckEnvVar ( )

Definition at line 1255 of file gtest-port.cc.

1255 {
1256 std::string default_value_for_output_flag = "";
1257 const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
1258 if (NULL != xml_output_file_env) {
1259 default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
1260 }
1261 return default_value_for_output_flag;
1262}
Here is the call graph for this function:

◆ ParseGoogleTestFlagsOnly() [1/2]

void testing::internal::ParseGoogleTestFlagsOnly ( int * argc,
char ** argv )

Definition at line 5749 of file gtest.cc.

5749 {
5751}
void ParseGoogleTestFlagsOnlyImpl(int *argc, CharType **argv)
Definition gtest.cc:5696
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseGoogleTestFlagsOnly() [2/2]

void testing::internal::ParseGoogleTestFlagsOnly ( int * argc,
wchar_t ** argv )

Definition at line 5752 of file gtest.cc.

5752 {
5754}
Here is the call graph for this function:

◆ ParseGoogleTestFlagsOnlyImpl()

template<typename CharType >
void testing::internal::ParseGoogleTestFlagsOnlyImpl ( int * argc,
CharType ** argv )

Definition at line 5696 of file gtest.cc.

5696 {
5697 for (int i = 1; i < *argc; i++) {
5698 const std::string arg_string = StreamableToString(argv[i]);
5699 const char* const arg = arg_string.c_str();
5700
5701 using internal::ParseBoolFlag;
5702 using internal::ParseInt32Flag;
5703 using internal::ParseStringFlag;
5704
5705 bool remove_flag = false;
5706 if (ParseGoogleTestFlag(arg)) {
5707 remove_flag = true;
5708#if GTEST_USE_OWN_FLAGFILE_FLAG_
5709 } else if (ParseStringFlag(arg, kFlagfileFlag, &GTEST_FLAG(flagfile))) {
5710 LoadFlagsFromFile(GTEST_FLAG(flagfile));
5711 remove_flag = true;
5712#endif // GTEST_USE_OWN_FLAGFILE_FLAG_
5713 } else if (arg_string == "--help" || arg_string == "-h" ||
5714 arg_string == "-?" || arg_string == "/?" ||
5715 HasGoogleTestFlagPrefix(arg)) {
5716 // Both help flag and unrecognized Google Test flags (excluding
5717 // internal ones) trigger help display.
5718 g_help_flag = true;
5719 }
5720
5721 if (remove_flag) {
5722 // Shift the remainder of the argv list left by one. Note
5723 // that argv has (*argc + 1) elements, the last one always being
5724 // NULL. The following loop moves the trailing NULL element as
5725 // well.
5726 for (int j = i; j != *argc; j++) {
5727 argv[j] = argv[j + 1];
5728 }
5729
5730 // Decrements the argument count.
5731 (*argc)--;
5732
5733 // We also need to decrement the iterator as we just removed
5734 // an element.
5735 i--;
5736 }
5737 }
5738
5739 if (g_help_flag) {
5740 // We print the help here instead of in RUN_ALL_TESTS(), as the
5741 // latter may not be called at all if the user is using Google
5742 // Test with another testing framework.
5743 PrintColorEncoded(kColorEncodedHelpMessage);
5744 }
5745}
#define GTEST_FLAG(name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseInt32()

bool testing::internal::ParseInt32 ( const Message & src_text,
const char * str,
Int32 * value )

Definition at line 1167 of file gtest-port.cc.

1167 {
1168 // Parses the environment variable as a decimal integer.
1169 char* end = NULL;
1170 const long long_value = strtol(str, &end, 10); // NOLINT
1171
1172 // Has strtol() consumed all characters in the string?
1173 if (*end != '\0') {
1174 // No - an invalid character was encountered.
1175 Message msg;
1176 msg << "WARNING: " << src_text
1177 << " is expected to be a 32-bit integer, but actually"
1178 << " has value \"" << str << "\".\n";
1179 printf("%s", msg.GetString().c_str());
1180 fflush(stdout);
1181 return false;
1182 }
1183
1184 // Is the parsed value in the range of an Int32?
1185 const Int32 result = static_cast<Int32>(long_value);
1186 if (long_value == LONG_MAX || long_value == LONG_MIN ||
1187 // The parsed value overflows as a long. (strtol() returns
1188 // LONG_MAX or LONG_MIN when the input overflows.)
1189 result != long_value
1190 // The parsed value overflows as an Int32.
1191 ) {
1192 Message msg;
1193 msg << "WARNING: " << src_text
1194 << " is expected to be a 32-bit integer, but actually"
1195 << " has value " << str << ", which overflows.\n";
1196 printf("%s", msg.GetString().c_str());
1197 fflush(stdout);
1198 return false;
1199 }
1200
1201 *value = result;
1202 return true;
1203}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseInt32Flag()

bool testing::internal::ParseInt32Flag ( const char * str,
const char * flag,
Int32 * value )

Definition at line 5487 of file gtest.cc.

5487 {
5488 // Gets the value of the flag as a string.
5489 const char* const value_str = ParseFlagValue(str, flag, false);
5490
5491 // Aborts if the parsing failed.
5492 if (value_str == NULL) return false;
5493
5494 // Sets *value to the value of the flag.
5495 return ParseInt32(Message() << "The value of flag --" << flag,
5496 value_str, value);
5497}
bool ParseInt32(const Message &src_text, const char *str, Int32 *value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintCharAndCodeTo()

template<typename UnsignedChar , typename Char >
void testing::internal::PrintCharAndCodeTo ( Char c,
ostream * os )

Definition at line 221 of file gtest-printers.cc.

221 {
222 // First, print c as a literal in the most readable form we can find.
223 *os << ((sizeof(c) > 1) ? "L'" : "'");
224 const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
225 *os << "'";
226
227 // To aid user debugging, we also print c's code in decimal, unless
228 // it's 0 (in which case c was printed as '\\0', making the code
229 // obvious).
230 if (c == 0)
231 return;
232 *os << " (" << static_cast<int>(c);
233
234 // For more convenience, we print c's code again in hexadecimal,
235 // unless c was already printed in the form '\x##' or the code is in
236 // [1, 9].
237 if (format == kHexEscape || (1 <= c && c <= 9)) {
238 // Do nothing.
239 } else {
240 *os << ", 0x" << String::FormatHexInt(static_cast<UnsignedChar>(c));
241 }
242 *os << ")";
243}
cmd_format format
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintIfNotEmpty()

void testing::internal::PrintIfNotEmpty ( const std::string & explanation,
::std::ostream * os )
inline

Definition at line 845 of file gmock-matchers.h.

846 {
847 if (explanation != "" && os != NULL) {
848 *os << ", " << explanation;
849 }
850}
Here is the caller graph for this function:

◆ PrintRawArrayTo()

template<typename T >
void testing::internal::PrintRawArrayTo ( const T a[],
size_t count,
::std::ostream * os )

Definition at line 596 of file gtest-printers.h.

596 {
597 UniversalPrint(a[0], os);
598 for (size_t i = 1; i != count; i++) {
599 *os << ", ";
600 UniversalPrint(a[i], os);
601 }
602}
void UniversalPrint(const T &value, ::std::ostream *os)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintStringTo() [1/2]

GTEST_API_ void testing::internal::PrintStringTo ( const ::std::string & s,
::std::ostream * os )
Here is the caller graph for this function:

◆ PrintStringTo() [2/2]

void testing::internal::PrintStringTo ( const ::std::string & s,
ostream * os )

Definition at line 435 of file gtest-printers.cc.

435 {
436 if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
437 if (GTEST_FLAG(print_utf8)) {
438 ConditionalPrintAsText(s.data(), s.size(), os);
439 }
440 }
441}

◆ PrintTo() [1/20]

void testing::internal::PrintTo ( bool x,
::std::ostream * os )
inline

Definition at line 543 of file gtest-printers.h.

543 {
544 *os << (x ? "true" : "false");
545}

◆ PrintTo() [2/20]

void testing::internal::PrintTo ( char * s,
::std::ostream * os )
inline

Definition at line 558 of file gtest-printers.h.

558 {
559 PrintTo(ImplicitCast_<const char*>(s), os);
560}
void PrintTo(EnumWithPrintTo e, std::ostream *os)
Here is the call graph for this function:

◆ PrintTo() [3/20]

void testing::internal::PrintTo ( char c,
::std::ostream * os )
inline

Definition at line 535 of file gtest-printers.h.

535 {
536 // When printing a plain char, we always treat it as unsigned. This
537 // way, the output won't be affected by whether the compiler thinks
538 // char is signed or not.
539 PrintTo(static_cast<unsigned char>(c), os);
540}
Here is the call graph for this function:

◆ PrintTo() [4/20]

template<typename T1 , typename T2 >
void testing::internal::PrintTo ( const ::std::pair< T1, T2 > & value,
::std::ostream * os )

Definition at line 735 of file gtest-printers.h.

735 {
736 *os << '(';
737 // We cannot use UniversalPrint(value.first, os) here, as T1 may be
738 // a reference type. The same for printing value.second.
740 *os << ", ";
742 *os << ')';
743}
Here is the call graph for this function:

◆ PrintTo() [5/20]

void testing::internal::PrintTo ( const ::std::string & s,
::std::ostream * os )
inline

Definition at line 613 of file gtest-printers.h.

613 {
615}
GTEST_API_ void PrintStringTo(const ::std::string &s, ::std::ostream *os)
Here is the call graph for this function:

◆ PrintTo() [6/20]

GTEST_API_ void testing::internal::PrintTo ( const char * s,
::std::ostream * os )

◆ PrintTo() [7/20]

void testing::internal::PrintTo ( const char * s,
ostream * os )

Definition at line 330 of file gtest-printers.cc.

330 {
331 if (s == NULL) {
332 *os << "NULL";
333 } else {
334 *os << ImplicitCast_<const void*>(s) << " pointing to ";
335 PrintCharsAsStringTo(s, strlen(s), os);
336 }
337}

◆ PrintTo() [8/20]

template<typename T >
void testing::internal::PrintTo ( const ReferenceWrapper< T > & ref,
::std::ostream * os )

Definition at line 1015 of file gmock-actions.h.

1015 {
1016 T& value = ref;
1018}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintTo() [9/20]

void testing::internal::PrintTo ( const signed char * s,
::std::ostream * os )
inline

Definition at line 564 of file gtest-printers.h.

564 {
565 PrintTo(ImplicitCast_<const void*>(s), os);
566}
Here is the call graph for this function:

◆ PrintTo() [10/20]

template<typename T >
void testing::internal::PrintTo ( const T & value,
::std::ostream * os )

Definition at line 491 of file gtest-printers.h.

491 {
492 // DefaultPrintTo() is overloaded. The type of its first argument
493 // determines which version will be picked.
494 //
495 // Note that we check for container types here, prior to we check
496 // for protocol message types in our operator<<. The rationale is:
497 //
498 // For protocol messages, we want to give people a chance to
499 // override Google Mock's format by defining a PrintTo() or
500 // operator<<. For STL containers, other formats can be
501 // incompatible with Google Mock's format for the container
502 // elements; therefore we check for container types here to ensure
503 // that our format is used.
504 //
505 // Note that MSVC and clang-cl do allow an implicit conversion from
506 // pointer-to-function to pointer-to-object, but clang-cl warns on it.
507 // So don't use ImplicitlyConvertible if it can be helped since it will
508 // cause this warning, and use a separate overload of DefaultPrintTo for
509 // function pointers so that the `*os << p` in the object pointer overload
510 // doesn't cause that warning either.
513 (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) &&
515 ? kPrintContainer
517 ? kPrintOther
519 : std::is_function<typename std::remove_pointer<T>::type>::value
520#else
522#endif
523 ? kPrintFunctionPointer
524 : kPrintPointer > (),
525 value, os);
526}
#define GTEST_LANG_CXX11
Definition gtest-port.h:337
void DefaultPrintTo(WrapPrinterType< kPrintContainer >, const C &container, ::std::ostream *os)
Here is the call graph for this function:

◆ PrintTo() [11/20]

void testing::internal::PrintTo ( const unsigned char * s,
::std::ostream * os )
inline

Definition at line 570 of file gtest-printers.h.

570 {
571 PrintTo(ImplicitCast_<const void*>(s), os);
572}
Here is the call graph for this function:

◆ PrintTo() [12/20]

GTEST_API_ void testing::internal::PrintTo ( const wchar_t * s,
::std::ostream * os )

◆ PrintTo() [13/20]

void testing::internal::PrintTo ( const wchar_t * s,
ostream * os )

Definition at line 347 of file gtest-printers.cc.

347 {
348 if (s == NULL) {
349 *os << "NULL";
350 } else {
351 *os << ImplicitCast_<const void*>(s) << " pointing to ";
352 PrintCharsAsStringTo(s, std::wcslen(s), os);
353 }
354}

◆ PrintTo() [14/20]

void testing::internal::PrintTo ( signed char * s,
::std::ostream * os )
inline

Definition at line 567 of file gtest-printers.h.

567 {
568 PrintTo(ImplicitCast_<const void*>(s), os);
569}
Here is the call graph for this function:

◆ PrintTo() [15/20]

void testing::internal::PrintTo ( signed char c,
::std::ostream * os )

Definition at line 248 of file gtest-printers.cc.

248 {
249 PrintCharAndCodeTo<unsigned char>(c, os);
250}
Here is the call graph for this function:

◆ PrintTo() [16/20]

void testing::internal::PrintTo ( unsigned char * s,
::std::ostream * os )
inline

Definition at line 573 of file gtest-printers.h.

573 {
574 PrintTo(ImplicitCast_<const void*>(s), os);
575}
Here is the call graph for this function:

◆ PrintTo() [17/20]

void testing::internal::PrintTo ( unsigned char c,
::std::ostream * os )

Definition at line 245 of file gtest-printers.cc.

245 {
246 PrintCharAndCodeTo<unsigned char>(c, os);
247}
Here is the call graph for this function:

◆ PrintTo() [18/20]

void testing::internal::PrintTo ( wchar_t * s,
::std::ostream * os )
inline

Definition at line 585 of file gtest-printers.h.

585 {
586 PrintTo(ImplicitCast_<const wchar_t*>(s), os);
587}
Here is the call graph for this function:

◆ PrintTo() [19/20]

GTEST_API_ void testing::internal::PrintTo ( wchar_t wc,
::std::ostream * os )

◆ PrintTo() [20/20]

void testing::internal::PrintTo ( wchar_t wc,
ostream * os )

Definition at line 254 of file gtest-printers.cc.

254 {
255 PrintCharAndCodeTo<wchar_t>(wc, os);
256}
Here is the call graph for this function:

◆ ReadEntireFile()

std::string testing::internal::ReadEntireFile ( FILE * file)

Definition at line 1085 of file gtest-port.cc.

1085 {
1086 const size_t file_size = GetFileSize(file);
1087 char* const buffer = new char[file_size];
1088
1089 size_t bytes_last_read = 0; // # of bytes read in the last fread()
1090 size_t bytes_read = 0; // # of bytes read so far
1091
1092 fseek(file, 0, SEEK_SET);
1093
1094 // Keeps reading the file until we cannot read further or the
1095 // pre-determined file size is reached.
1096 do {
1097 bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file);
1098 bytes_read += bytes_last_read;
1099 } while (bytes_last_read > 0 && bytes_read < file_size);
1100
1101 const std::string content(buffer, bytes_read);
1102 delete[] buffer;
1103
1104 return content;
1105}
GTEST_API_ size_t GetFileSize(FILE *file)
Here is the call graph for this function:

◆ ReportFailureInUnknownLocation()

void testing::internal::ReportFailureInUnknownLocation ( TestPartResult::Type result_type,
const std::string & message )

Definition at line 2266 of file gtest.cc.

2267 {
2268 // This function is a friend of UnitTest and as such has access to
2269 // AddTestPartResult.
2270 UnitTest::GetInstance()->AddTestPartResult(
2271 result_type,
2272 NULL, // No info about the source file where the exception occurred.
2273 -1, // We have no info on which line caused the exception.
2274 message,
2275 ""); // No stack trace, either.
2276}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReportInvalidTestCaseType()

void testing::internal::ReportInvalidTestCaseType ( const char * test_case_name,
CodeLocation code_location )

Definition at line 2578 of file gtest.cc.

2579 {
2580 Message errors;
2581 errors
2582 << "Attempted redefinition of test case " << test_case_name << ".\n"
2583 << "All tests in the same test case must use the same test fixture\n"
2584 << "class. However, in test case " << test_case_name << ", you tried\n"
2585 << "to define a test using a fixture class different from the one\n"
2586 << "used earlier. This can happen if the two fixture classes are\n"
2587 << "from different namespaces and have the same name. You should\n"
2588 << "probably rename one of the classes to put the tests into different\n"
2589 << "test cases.";
2590
2591 GTEST_LOG_(ERROR) << FormatFileLocation(code_location.file.c_str(),
2592 code_location.line)
2593 << " " << errors.GetString();
2594}
#define GTEST_LOG_(severity)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReportUninterestingCall()

void testing::internal::ReportUninterestingCall ( CallReaction reaction,
const std::string & msg )

Definition at line 279 of file gmock-spec-builders.cc.

279 {
280 // Include a stack trace only if --gmock_verbose=info is specified.
281 const int stack_frames_to_skip =
282 GMOCK_FLAG(verbose) == kInfoVerbosity ? 3 : -1;
283 switch (reaction) {
284 case kAllow:
285 Log(kInfo, msg, stack_frames_to_skip);
286 break;
287 case kWarn:
288 Log(kWarning,
289 msg +
290 "\nNOTE: You can safely ignore the above warning unless this "
291 "call should not happen. Do not suppress it by blindly adding "
292 "an EXPECT_CALL() if you don't mean to enforce the call. "
293 "See "
294 "https://github.com/google/googletest/blob/master/googlemock/"
295 "docs/CookBook.md#"
296 "knowing-when-to-expect for details.\n",
297 stack_frames_to_skip);
298 break;
299 default: // FAIL
300 Expect(false, NULL, -1, msg);
301 }
302}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldRunTestOnShard()

bool testing::internal::ShouldRunTestOnShard ( int total_shards,
int shard_index,
int test_id )

Definition at line 5191 of file gtest.cc.

5191 {
5192 return (test_id % total_shards) == shard_index;
5193}
Here is the caller graph for this function:

◆ ShouldShard()

bool testing::internal::ShouldShard ( const char * total_shards_str,
const char * shard_index_str,
bool in_subprocess_for_death_test )

Definition at line 5128 of file gtest.cc.

5130 {
5131 if (in_subprocess_for_death_test) {
5132 return false;
5133 }
5134
5135 const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1);
5136 const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1);
5137
5138 if (total_shards == -1 && shard_index == -1) {
5139 return false;
5140 } else if (total_shards == -1 && shard_index != -1) {
5141 const Message msg = Message()
5142 << "Invalid environment variables: you have "
5143 << kTestShardIndex << " = " << shard_index
5144 << ", but have left " << kTestTotalShards << " unset.\n";
5145 ColoredPrintf(COLOR_RED, msg.GetString().c_str());
5146 fflush(stdout);
5147 exit(EXIT_FAILURE);
5148 } else if (total_shards != -1 && shard_index == -1) {
5149 const Message msg = Message()
5150 << "Invalid environment variables: you have "
5151 << kTestTotalShards << " = " << total_shards
5152 << ", but have left " << kTestShardIndex << " unset.\n";
5153 ColoredPrintf(COLOR_RED, msg.GetString().c_str());
5154 fflush(stdout);
5155 exit(EXIT_FAILURE);
5156 } else if (shard_index < 0 || shard_index >= total_shards) {
5157 const Message msg = Message()
5158 << "Invalid environment variables: we require 0 <= "
5159 << kTestShardIndex << " < " << kTestTotalShards
5160 << ", but you have " << kTestShardIndex << "=" << shard_index
5161 << ", " << kTestTotalShards << "=" << total_shards << ".\n";
5162 ColoredPrintf(COLOR_RED, msg.GetString().c_str());
5163 fflush(stdout);
5164 exit(EXIT_FAILURE);
5165 }
5166
5167 return total_shards > 1;
5168}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldUseColor()

bool testing::internal::ShouldUseColor ( bool stdout_is_tty)

Definition at line 2959 of file gtest.cc.

2959 {
2960 const char* const gtest_color = GTEST_FLAG(color).c_str();
2961
2962 if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
2963#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
2964 // On Windows the TERM variable is usually not set, but the
2965 // console there does support colors.
2966 return stdout_is_tty;
2967#else
2968 // On non-Windows platforms, we rely on the TERM variable.
2969 const char* const term = posix::GetEnv("TERM");
2970 const bool term_supports_color =
2971 String::CStringEquals(term, "xterm") ||
2972 String::CStringEquals(term, "xterm-color") ||
2973 String::CStringEquals(term, "xterm-256color") ||
2974 String::CStringEquals(term, "screen") ||
2975 String::CStringEquals(term, "screen-256color") ||
2976 String::CStringEquals(term, "tmux") ||
2977 String::CStringEquals(term, "tmux-256color") ||
2978 String::CStringEquals(term, "rxvt-unicode") ||
2979 String::CStringEquals(term, "rxvt-unicode-256color") ||
2980 String::CStringEquals(term, "linux") ||
2981 String::CStringEquals(term, "cygwin");
2982 return stdout_is_tty && term_supports_color;
2983#endif // GTEST_OS_WINDOWS
2984 }
2985
2986 return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
2987 String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
2988 String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
2989 String::CStringEquals(gtest_color, "1");
2990 // We take "yes", "true", "t", and "1" as meaning "yes". If the
2991 // value is neither one of these nor "auto", we treat it as "no" to
2992 // be conservative.
2993}
Here is the call graph for this function:

◆ Shuffle()

template<typename E >
void testing::internal::Shuffle ( internal::Random * random,
std::vector< E > * v )
inline

Definition at line 329 of file gtest-internal-inl.h.

329 {
330 ShuffleRange(random, 0, static_cast<int>(v->size()), v);
331}
uint16_t random
Definition yubico_otp.c:47
Here is the call graph for this function:

◆ ShuffleRange()

template<typename E >
void testing::internal::ShuffleRange ( internal::Random * random,
int begin,
int end,
std::vector< E > * v )

Definition at line 308 of file gtest-internal-inl.h.

309 {
310 const int size = static_cast<int>(v->size());
311 GTEST_CHECK_(0 <= begin && begin <= size)
312 << "Invalid shuffle range start " << begin << ": must be in range [0, "
313 << size << "].";
314 GTEST_CHECK_(begin <= end && end <= size)
315 << "Invalid shuffle range finish " << end << ": must be in range ["
316 << begin << ", " << size << "].";
317
318 // Fisher-Yates shuffle, from
319 // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle
320 for (int range_width = end - begin; range_width >= 2; range_width--) {
321 const int last_in_range = begin + range_width - 1;
322 const int selected = begin + random->Generate(range_width);
323 std::swap((*v)[selected], (*v)[last_in_range]);
324 }
325}
void swap(picojson::value &x, picojson::value &y)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SkipPrefix()

bool testing::internal::SkipPrefix ( const char * prefix,
const char ** pstr )

Definition at line 5419 of file gtest.cc.

5419 {
5420 const size_t prefix_len = strlen(prefix);
5421 if (strncmp(*pstr, prefix, prefix_len) == 0) {
5422 *pstr += prefix_len;
5423 return true;
5424 }
5425 return false;
5426}

◆ SplitString()

void testing::internal::SplitString ( const ::std::string & str,
char delimiter,
::std::vector< ::std::string > * dest )

Definition at line 936 of file gtest.cc.

937 {
938 ::std::vector< ::std::string> parsed;
939 ::std::string::size_type pos = 0;
941 const ::std::string::size_type colon = str.find(delimiter, pos);
942 if (colon == ::std::string::npos) {
943 parsed.push_back(str.substr(pos));
944 break;
945 } else {
946 parsed.push_back(str.substr(pos, colon - pos));
947 pos = colon + 1;
948 }
949 }
950 dest->swap(parsed);
951}
GTEST_API_ bool AlwaysTrue()
Definition gtest.cc:5406
Here is the call graph for this function:

◆ StreamableToString()

template<typename T >
std::string testing::internal::StreamableToString ( const T & streamable)

Definition at line 242 of file gtest-message.h.

242 {
243 return (Message() << streamable).GetString();
244}
Here is the caller graph for this function:

◆ StringFromGTestEnv()

const char * testing::internal::StringFromGTestEnv ( const char * flag,
const char * default_val )

Definition at line 1266 of file gtest-port.cc.

1266 {
1267#if defined(GTEST_GET_STRING_FROM_ENV_)
1268 return GTEST_GET_STRING_FROM_ENV_(flag, default_value);
1269#else
1270 const std::string env_var = FlagToEnvVar(flag);
1271 const char* const value = posix::GetEnv(env_var.c_str());
1272 return value == NULL ? default_value : value;
1273#endif // defined(GTEST_GET_STRING_FROM_ENV_)
1274}
Here is the call graph for this function:

◆ StringStreamToString()

std::string testing::internal::StringStreamToString ( ::std::stringstream * stream)

Definition at line 1997 of file gtest.cc.

1997 {
1998 const ::std::string& str = ss->str();
1999 const char* const start = str.c_str();
2000 const char* const end = start + str.length();
2001
2002 std::string result;
2003 result.reserve(2 * (end - start));
2004 for (const char* ch = start; ch != end; ++ch) {
2005 if (*ch == '\0') {
2006 result += "\\0"; // Replaces NUL with "\\0";
2007 } else {
2008 result += *ch;
2009 }
2010 }
2011
2012 return result;
2013}
Here is the caller graph for this function:

◆ StripTrailingSpaces()

std::string testing::internal::StripTrailingSpaces ( std::string str)
inline

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

2416 {
2417 std::string::iterator it = str.end();
2418 while (it != str.begin() && IsSpace(*--it))
2419 it = str.erase(it);
2420 return str;
2421}
bool IsSpace(char ch)
Here is the call graph for this function:

◆ TEST() [1/41]

testing::internal::TEST ( ApiTest ,
DISABLED_Dummy1  )

Definition at line 231 of file gtest-unittest-api_test.cc.

231{}

◆ TEST() [2/41]

testing::internal::TEST ( ApiTest ,
TestCaseDisabledAccessorsWork  )

Definition at line 210 of file gtest-unittest-api_test.cc.

210 {
211 const TestCase* test_case = UnitTestHelper::FindTestCase("DISABLED_Test");
212 ASSERT_TRUE(test_case != NULL);
213
214 EXPECT_STREQ("DISABLED_Test", test_case->name());
215 EXPECT_TRUE(IsNull(test_case->type_param()));
216 EXPECT_FALSE(test_case->should_run());
217 EXPECT_EQ(1, test_case->disabled_test_count());
218 EXPECT_EQ(0, test_case->test_to_run_count());
219 ASSERT_EQ(1, test_case->total_test_count());
220
221 const TestInfo* const test_info = test_case->GetTestInfo(0);
222 EXPECT_STREQ("Dummy2", test_info->name());
223 EXPECT_STREQ("DISABLED_Test", test_info->test_case_name());
224 EXPECT_TRUE(IsNull(test_info->value_param()));
225 EXPECT_TRUE(IsNull(test_info->type_param()));
226 EXPECT_FALSE(test_info->should_run());
227}
const char * type_param() const
Definition gtest.h:833
const TestInfo * GetTestInfo(int i) const
Definition gtest.cc:2751
int test_to_run_count() const
Definition gtest.cc:2714
const char * name() const
Definition gtest.h:829
bool should_run() const
Definition gtest.h:840
int disabled_test_count() const
Definition gtest.cc:2704
int total_test_count() const
Definition gtest.cc:2719
const char * value_param() const
Definition gtest.h:692
bool should_run() const
Definition gtest.h:723
const char * type_param() const
Definition gtest.h:684
const char * name() const
Definition gtest.h:680
const char * test_case_name() const
Definition gtest.h:677
#define ASSERT_EQ(val1, val2)
Definition gtest.h:1988
#define EXPECT_EQ(val1, val2)
Definition gtest.h:1954
#define EXPECT_TRUE(condition)
Definition gtest.h:1895
#define EXPECT_STREQ(s1, s2)
Definition gtest.h:2027
#define ASSERT_TRUE(condition)
Definition gtest.h:1901
#define EXPECT_FALSE(condition)
Definition gtest.h:1898
Here is the call graph for this function:

◆ TEST() [3/41]

testing::internal::TEST ( ApiTest ,
TestCaseImmutableAccessorsWork  )

Definition at line 147 of file gtest-unittest-api_test.cc.

147 {
148 const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest");
149 ASSERT_TRUE(test_case != NULL);
150
151 EXPECT_STREQ("ApiTest", test_case->name());
152 EXPECT_TRUE(IsNull(test_case->type_param()));
153 EXPECT_TRUE(test_case->should_run());
154 EXPECT_EQ(1, test_case->disabled_test_count());
155 EXPECT_EQ(3, test_case->test_to_run_count());
156 ASSERT_EQ(4, test_case->total_test_count());
157
158 const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
159
160 EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
161 EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
162 EXPECT_TRUE(IsNull(tests[0]->value_param()));
163 EXPECT_TRUE(IsNull(tests[0]->type_param()));
164 EXPECT_FALSE(tests[0]->should_run());
165
166 EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
167 EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
168 EXPECT_TRUE(IsNull(tests[1]->value_param()));
169 EXPECT_TRUE(IsNull(tests[1]->type_param()));
170 EXPECT_TRUE(tests[1]->should_run());
171
172 EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
173 EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
174 EXPECT_TRUE(IsNull(tests[2]->value_param()));
175 EXPECT_TRUE(IsNull(tests[2]->type_param()));
176 EXPECT_TRUE(tests[2]->should_run());
177
178 EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
179 EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
180 EXPECT_TRUE(IsNull(tests[3]->value_param()));
181 EXPECT_TRUE(IsNull(tests[3]->type_param()));
182 EXPECT_TRUE(tests[3]->should_run());
183
184 delete[] tests;
185 tests = NULL;
186
187#if GTEST_HAS_TYPED_TEST
188 test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0");
189 ASSERT_TRUE(test_case != NULL);
190
191 EXPECT_STREQ("TestCaseWithCommentTest/0", test_case->name());
192 EXPECT_STREQ(GetTypeName<int>().c_str(), test_case->type_param());
193 EXPECT_TRUE(test_case->should_run());
194 EXPECT_EQ(0, test_case->disabled_test_count());
195 EXPECT_EQ(1, test_case->test_to_run_count());
196 ASSERT_EQ(1, test_case->total_test_count());
197
198 tests = UnitTestHelper::GetSortedTests(test_case);
199
200 EXPECT_STREQ("Dummy", tests[0]->name());
201 EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
202 EXPECT_TRUE(IsNull(tests[0]->value_param()));
203 EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
204 EXPECT_TRUE(tests[0]->should_run());
205
206 delete[] tests;
207#endif // GTEST_HAS_TYPED_TEST
208}
Here is the call graph for this function:

◆ TEST() [4/41]

testing::internal::TEST ( ApiTest ,
UnitTestImmutableAccessorsWork  )

Definition at line 114 of file gtest-unittest-api_test.cc.

114 {
115 UnitTest* unit_test = UnitTest::GetInstance();
116
117 ASSERT_EQ(2 + kTypedTestCases, unit_test->total_test_case_count());
118 EXPECT_EQ(1 + kTypedTestCases, unit_test->test_case_to_run_count());
119 EXPECT_EQ(2, unit_test->disabled_test_count());
120 EXPECT_EQ(5 + kTypedTests, unit_test->total_test_count());
121 EXPECT_EQ(3 + kTypedTests, unit_test->test_to_run_count());
122
123 const TestCase** const test_cases = UnitTestHelper::GetSortedTestCases();
124
125 EXPECT_STREQ("ApiTest", test_cases[0]->name());
126 EXPECT_STREQ("DISABLED_Test", test_cases[1]->name());
127#if GTEST_HAS_TYPED_TEST
128 EXPECT_STREQ("TestCaseWithCommentTest/0", test_cases[2]->name());
129#endif // GTEST_HAS_TYPED_TEST
130
131 delete[] test_cases;
132
133 // The following lines initiate actions to verify certain methods in
134 // FinalSuccessChecker::TearDown.
135
136 // Records a test property to verify TestResult::GetTestProperty().
137 RecordProperty("key", "value");
138}
int test_to_run_count() const
Definition gtest.cc:4443
int total_test_case_count() const
Definition gtest.cc:4406
int test_case_to_run_count() const
Definition gtest.cc:4412
int disabled_test_count() const
Definition gtest.cc:4430
int total_test_count() const
Definition gtest.cc:4440
Here is the call graph for this function:

◆ TEST() [5/41]

testing::internal::TEST ( CaptureDeathTest ,
CannotReenterStdoutCapture  )

Definition at line 954 of file gtest-port_test.cc.

954 {
957 "Only one stdout capturer can exist at a time");
959
960 // We cannot test stderr capturing using death tests as they use it
961 // themselves.
962}
#define EXPECT_DEATH_IF_SUPPORTED(statement, regex)
GTEST_API_ void CaptureStdout()
GTEST_API_ std::string GetCapturedStdout()
Here is the call graph for this function:

◆ TEST() [6/41]

testing::internal::TEST ( CaptureTest ,
CapturesStderr  )

Definition at line 934 of file gtest-port_test.cc.

934 {
935 CaptureStderr();
936 fprintf(stderr, "jkl");
937 EXPECT_STREQ("jkl", GetCapturedStderr().c_str());
938
939 CaptureStderr();
940 fprintf(stderr, "jkl%cmno", '\0');
941 EXPECT_EQ(::std::string("jkl\0mno", 7), ::std::string(GetCapturedStderr()));
942}
Here is the call graph for this function:

◆ TEST() [7/41]

testing::internal::TEST ( CaptureTest ,
CapturesStdout  )

Definition at line 924 of file gtest-port_test.cc.

924 {
926 fprintf(stdout, "abc");
927 EXPECT_STREQ("abc", GetCapturedStdout().c_str());
928
930 fprintf(stdout, "def%cghi", '\0');
931 EXPECT_EQ(::std::string("def\0ghi", 7), ::std::string(GetCapturedStdout()));
932}
Here is the call graph for this function:

◆ TEST() [8/41]

testing::internal::TEST ( CaptureTest ,
CapturesStdoutAndStderr  )

Definition at line 945 of file gtest-port_test.cc.

945 {
947 CaptureStderr();
948 fprintf(stdout, "pqr");
949 fprintf(stderr, "stu");
950 EXPECT_STREQ("pqr", GetCapturedStdout().c_str());
951 EXPECT_STREQ("stu", GetCapturedStderr().c_str());
952}
Here is the call graph for this function:

◆ TEST() [9/41]

testing::internal::TEST ( DISABLED_Test ,
Dummy2  )

Definition at line 232 of file gtest-unittest-api_test.cc.

232{}

◆ TEST() [10/41]

testing::internal::TEST ( FormatCompilerIndependentFileLocationTest ,
FormatsFileLocation  )

Definition at line 282 of file gtest-port_test.cc.

282 {
283 EXPECT_EQ("foo.cc:42", FormatCompilerIndependentFileLocation("foo.cc", 42));
284}
GTEST_API_::std::string FormatCompilerIndependentFileLocation(const char *file, int line)
Here is the call graph for this function:

◆ TEST() [11/41]

testing::internal::TEST ( FormatCompilerIndependentFileLocationTest ,
FormatsUknownFile  )

Definition at line 286 of file gtest-port_test.cc.

286 {
287 EXPECT_EQ("unknown file:42",
289}
Here is the call graph for this function:

◆ TEST() [12/41]

testing::internal::TEST ( FormatCompilerIndependentFileLocationTest ,
FormatsUknownFileAndLine  )

Definition at line 295 of file gtest-port_test.cc.

295 {
296 EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(NULL, -1));
297}
Here is the call graph for this function:

◆ TEST() [13/41]

testing::internal::TEST ( FormatCompilerIndependentFileLocationTest ,
FormatsUknownLine  )

Definition at line 291 of file gtest-port_test.cc.

291 {
292 EXPECT_EQ("foo.cc", FormatCompilerIndependentFileLocation("foo.cc", -1));
293}
Here is the call graph for this function:

◆ TEST() [14/41]

testing::internal::TEST ( FormatFileLocationTest ,
FormatsFileLocation  )

Definition at line 262 of file gtest-port_test.cc.

262 {
263 EXPECT_PRED_FORMAT2(IsSubstring, "foo.cc", FormatFileLocation("foo.cc", 42));
264 EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation("foo.cc", 42));
265}
#define EXPECT_PRED_FORMAT2(pred_format, v1, v2)
Here is the call graph for this function:

◆ TEST() [15/41]

testing::internal::TEST ( FormatFileLocationTest ,
FormatsUknownFileAndLine  )

Definition at line 277 of file gtest-port_test.cc.

277 {
278 EXPECT_EQ("unknown file:", FormatFileLocation(NULL, -1));
279}
Here is the call graph for this function:

◆ TEST() [16/41]

testing::internal::TEST ( FormatFileLocationTest ,
FormatsUknownLine  )

Definition at line 273 of file gtest-port_test.cc.

273 {
274 EXPECT_EQ("foo.cc:", FormatFileLocation("foo.cc", -1));
275}
Here is the call graph for this function:

◆ TEST() [17/41]

testing::internal::TEST ( FormatFileLocationTest ,
FormatsUnknownFile  )

Definition at line 267 of file gtest-port_test.cc.

267 {
269 IsSubstring, "unknown file", FormatFileLocation(NULL, 42));
270 EXPECT_PRED_FORMAT2(IsSubstring, "42", FormatFileLocation(NULL, 42));
271}
Here is the call graph for this function:

◆ TEST() [18/41]

testing::internal::TEST ( GetThreadCountTest ,
ReturnsZeroWhenUnableToCountThreads  )

Definition at line 340 of file gtest-port_test.cc.

340 {
342}
GTEST_API_ size_t GetThreadCount()
Definition dtoa.c:306
Here is the call graph for this function:

◆ TEST() [19/41]

testing::internal::TEST ( GtestCheckDeathTest ,
DiesWithCorrectOutputOnFailure  )

Definition at line 345 of file gtest-port_test.cc.

345 {
346 const bool a_false_condition = false;
347 const char regex[] =
348#ifdef _MSC_VER
349 "gtest-port_test\\.cc\\(\\d+\\):"
350#elif GTEST_USES_POSIX_RE
351 "gtest-port_test\\.cc:[0-9]+"
352#else
353 "gtest-port_test\\.cc:\\d+"
354#endif // _MSC_VER
355 ".*a_false_condition.*Extra info.*";
356
357 EXPECT_DEATH_IF_SUPPORTED(GTEST_CHECK_(a_false_condition) << "Extra info",
358 regex);
359}

◆ TEST() [20/41]

testing::internal::TEST ( GtestCheckSyntaxTest ,
BehavesLikeASingleStatement  )

Definition at line 232 of file gtest-port_test.cc.

232 {
233 if (AlwaysFalse())
234 GTEST_CHECK_(false) << "This should never be executed; "
235 "It's a compilation test only.";
236
237 if (AlwaysTrue())
238 GTEST_CHECK_(true);
239 else
240 ; // NOLINT
241
242 if (AlwaysFalse())
243 ; // NOLINT
244 else
245 GTEST_CHECK_(true) << "";
246}
Here is the call graph for this function:

◆ TEST() [21/41]

testing::internal::TEST ( GtestCheckSyntaxTest ,
WorksWithSwitch  )

Definition at line 248 of file gtest-port_test.cc.

248 {
249 switch (0) {
250 case 1:
251 break;
252 default:
253 GTEST_CHECK_(true);
254 }
255
256 switch (0)
257 case 0:
258 GTEST_CHECK_(true) << "Check failed in switch case";
259}

◆ TEST() [22/41]

testing::internal::TEST ( ImplicitCastTest ,
CanSelectBetweenConstAndNonConstCasrAppropriately  )

Definition at line 178 of file gtest-port_test.cc.

178 {
179 bool converted = false;
180 bool const_converted = false;
181 ConstAndNonConstCastable castable(&converted, &const_converted);
182 Base base = ::testing::internal::ImplicitCast_<Base>(castable);
183 EXPECT_TRUE(converted);
184 EXPECT_FALSE(const_converted);
185
186 converted = false;
187 const_converted = false;
188 const ConstAndNonConstCastable const_castable(&converted, &const_converted);
189 base = ::testing::internal::ImplicitCast_<Base>(const_castable);
190 EXPECT_FALSE(converted);
191 EXPECT_TRUE(const_converted);
192}
To ImplicitCast_(To x)
Here is the call graph for this function:

◆ TEST() [23/41]

testing::internal::TEST ( ImplicitCastTest ,
CanUseConstCastOperatorOnConstValues  )

Definition at line 153 of file gtest-port_test.cc.

153 {
154 bool converted = false;
155 const ConstCastable const_castable(&converted);
156 Base base = ::testing::internal::ImplicitCast_<Base>(const_castable);
157 EXPECT_TRUE(converted);
158}
Here is the call graph for this function:

◆ TEST() [24/41]

testing::internal::TEST ( ImplicitCastTest ,
CanUseImplicitConstructor  )

Definition at line 199 of file gtest-port_test.cc.

199 {
200 bool converted = false;
202 (void)to;
203 EXPECT_TRUE(converted);
204}
Here is the call graph for this function:

◆ TEST() [25/41]

testing::internal::TEST ( ImplicitCastTest ,
CanUseInheritance  )

Definition at line 116 of file gtest-port_test.cc.

116 {
117 Derived derived(1);
118 Base base = ::testing::internal::ImplicitCast_<Base>(derived);
119 EXPECT_EQ(derived.member(), base.member());
120}
Here is the call graph for this function:

◆ TEST() [26/41]

testing::internal::TEST ( ImplicitCastTest ,
CanUseNonConstCastOperator  )

Definition at line 134 of file gtest-port_test.cc.

134 {
135 bool converted = false;
136 Castable castable(&converted);
137 Base base = ::testing::internal::ImplicitCast_<Base>(castable);
138 EXPECT_TRUE(converted);
139}
Here is the call graph for this function:

◆ TEST() [27/41]

testing::internal::TEST ( ImplicitCastTest ,
ConvertsPointers  )

Definition at line 111 of file gtest-port_test.cc.

111 {
112 Derived derived(0);
114}
Here is the call graph for this function:

◆ TEST() [28/41]

testing::internal::TEST ( IsXDigitTest ,
ReturnsFalseForNarrowNonAscii  )

Definition at line 69 of file gtest-port_test.cc.

69 {
70 EXPECT_FALSE(IsXDigit(static_cast<char>('\x80')));
71 EXPECT_FALSE(IsXDigit(static_cast<char>('0' | '\x80')));
72}
bool IsXDigit(char ch)
Here is the call graph for this function:

◆ TEST() [29/41]

testing::internal::TEST ( IsXDigitTest ,
ReturnsFalseForWideNonAscii  )

Definition at line 87 of file gtest-port_test.cc.

87 {
88 EXPECT_FALSE(IsXDigit(static_cast<wchar_t>(0x80)));
89 EXPECT_FALSE(IsXDigit(static_cast<wchar_t>(L'0' | 0x80)));
90 EXPECT_FALSE(IsXDigit(static_cast<wchar_t>(L'0' | 0x100)));
91}
Here is the call graph for this function:

◆ TEST() [30/41]

testing::internal::TEST ( IsXDigitTest ,
WorksForNarrowAscii  )

Definition at line 56 of file gtest-port_test.cc.

56 {
63
67}
Here is the call graph for this function:

◆ TEST() [31/41]

testing::internal::TEST ( IsXDigitTest ,
WorksForWideAscii  )

Definition at line 74 of file gtest-port_test.cc.

74 {
75 EXPECT_TRUE(IsXDigit(L'0'));
76 EXPECT_TRUE(IsXDigit(L'9'));
77 EXPECT_TRUE(IsXDigit(L'A'));
78 EXPECT_TRUE(IsXDigit(L'F'));
79 EXPECT_TRUE(IsXDigit(L'a'));
80 EXPECT_TRUE(IsXDigit(L'f'));
81
85}
Here is the call graph for this function:

◆ TEST() [32/41]

testing::internal::TEST ( IteratorTraitsTest ,
WorksForPointerToConst  )

Definition at line 218 of file gtest-port_test.cc.

218 {
219 StaticAssertTypeEq<char, IteratorTraits<const char*>::value_type>();
220 StaticAssertTypeEq<const void*,
222}
Iterator::value_type value_type

◆ TEST() [33/41]

testing::internal::TEST ( IteratorTraitsTest ,
WorksForPointerToNonConst  )

Definition at line 213 of file gtest-port_test.cc.

213 {
214 StaticAssertTypeEq<char, IteratorTraits<char*>::value_type>();
215 StaticAssertTypeEq<const void*, IteratorTraits<const void**>::value_type>();
216}

◆ TEST() [34/41]

testing::internal::TEST ( IteratorTraitsTest ,
WorksForSTLContainerIterators  )

Definition at line 206 of file gtest-port_test.cc.

206 {
207 StaticAssertTypeEq<int,
209 StaticAssertTypeEq<bool,
211}

◆ TEST() [35/41]

testing::internal::TEST ( RegexEngineSelectionTest ,
SelectsCorrectRegexEngine  )

Definition at line 376 of file gtest-port_test.cc.

376 {
377#if !GTEST_USES_PCRE
378# if GTEST_HAS_POSIX_RE
379
381
382# else
383
384 EXPECT_TRUE(GTEST_USES_SIMPLE_RE);
385
386# endif
387#endif // !GTEST_USES_PCRE
388}
#define GTEST_USES_POSIX_RE
Definition gtest-port.h:454

◆ TEST() [36/41]

testing::internal::TEST ( ScopedPtrTest ,
DefinesElementType  )

Definition at line 226 of file gtest-port_test.cc.

226 {
227 StaticAssertTypeEq<int, ::testing::internal::scoped_ptr<int>::element_type>();
228}

◆ TEST() [37/41]

testing::internal::TEST ( ThreadLocalTest ,
DefaultConstructorInitializesToDefaultValues  )

Definition at line 966 of file gtest-port_test.cc.

966 {
968 EXPECT_EQ(0, t1.get());
969
971 EXPECT_TRUE(t2.get() == NULL);
972}
Here is the call graph for this function:

◆ TEST() [38/41]

testing::internal::TEST ( ThreadLocalTest ,
GetAndPointerReturnSameValue  )

Definition at line 994 of file gtest-port_test.cc.

994 {
995 ThreadLocal<std::string> thread_local_string;
996
997 EXPECT_EQ(thread_local_string.pointer(), &(thread_local_string.get()));
998
999 // Verifies the condition still holds after calling set.
1000 thread_local_string.set("foo");
1001 EXPECT_EQ(thread_local_string.pointer(), &(thread_local_string.get()));
1002}
void set(const T &value)
Here is the call graph for this function:

◆ TEST() [39/41]

testing::internal::TEST ( ThreadLocalTest ,
PointerAndConstPointerReturnSameValue  )

Definition at line 1004 of file gtest-port_test.cc.

1004 {
1005 ThreadLocal<std::string> thread_local_string;
1006 const ThreadLocal<std::string>& const_thread_local_string =
1007 thread_local_string;
1008
1009 EXPECT_EQ(thread_local_string.pointer(), const_thread_local_string.pointer());
1010
1011 thread_local_string.set("foo");
1012 EXPECT_EQ(thread_local_string.pointer(), const_thread_local_string.pointer());
1013}
Here is the call graph for this function:

◆ TEST() [40/41]

testing::internal::TEST ( ThreadLocalTest ,
SingleParamConstructorInitializesToParam  )

Definition at line 974 of file gtest-port_test.cc.

974 {
975 ThreadLocal<int> t1(123);
976 EXPECT_EQ(123, t1.get());
977
978 int i = 0;
979 ThreadLocal<int*> t2(&i);
980 EXPECT_EQ(&i, t2.get());
981}
Here is the call graph for this function:

◆ TEST() [41/41]

testing::internal::TEST ( ThreadLocalTest ,
ValueDefaultContructorIsNotRequiredForParamVersion  )

◆ TEST_F() [1/2]

testing::internal::TEST_F ( ListenerTest ,
DoesBar  )

Definition at line 165 of file gtest-listener_test.cc.

165 {
166 g_events->push_back("ListenerTest::* Test Body");
167 SUCCEED(); // Triggers OnTestPartResult.
168}
std::vector< std::string > * g_events
#define SUCCEED()
Definition gtest.h:1867

◆ TEST_F() [2/2]

testing::internal::TEST_F ( ListenerTest ,
DoesFoo  )

Definition at line 158 of file gtest-listener_test.cc.

158 {
159 // Test execution order within a test case is not guaranteed so we are not
160 // recording the test name.
161 g_events->push_back("ListenerTest::* Test Body");
162 SUCCEED(); // Triggers OnTestPartResult.
163}

◆ ToLower()

char testing::internal::ToLower ( char ch)
inline

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

2409 {
2410 return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
2411}
Here is the caller graph for this function:

◆ ToUpper()

char testing::internal::ToUpper ( char ch)
inline

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

2412 {
2413 return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
2414}

◆ TransformTupleValues()

template<typename Tuple , typename Func , typename OutIter >
OutIter testing::internal::TransformTupleValues ( Func f,
const Tuple & t,
OutIter out )

Definition at line 1020 of file gmock-matchers.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TupleMatches()

template<typename MatcherTuple , typename ValueTuple >
bool testing::internal::TupleMatches ( const MatcherTuple & matcher_tuple,
const ValueTuple & value_tuple )

Definition at line 963 of file gmock-matchers.h.

964 {
965 // Makes sure that matcher_tuple and value_tuple have the same
966 // number of fields.
967 GTEST_COMPILE_ASSERT_(tuple_size<MatcherTuple>::value ==
968 tuple_size<ValueTuple>::value,
969 matcher_and_value_have_different_numbers_of_fields);
971 Matches(matcher_tuple, value_tuple);
972}
#define GTEST_COMPILE_ASSERT_(expr, msg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UniversalPrint()

template<typename T >
void testing::internal::UniversalPrint ( const T & value,
::std::ostream * os )

Definition at line 931 of file gtest-printers.h.

931 {
932 // A workarond for the bug in VC++ 7.1 that prevents us from instantiating
933 // UniversalPrinter with T directly.
934 typedef T T1;
936}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UniversalPrintArray() [1/5]

GTEST_API_ void testing::internal::UniversalPrintArray ( const char * begin,
size_t len,
::std::ostream * os )

◆ UniversalPrintArray() [2/5]

void testing::internal::UniversalPrintArray ( const char * begin,
size_t len,
ostream * os )

Definition at line 319 of file gtest-printers.cc.

319 {
320 UniversalPrintCharArray(begin, len, os);
321}
size_t len

◆ UniversalPrintArray() [3/5]

template<typename T >
void testing::internal::UniversalPrintArray ( const T * begin,
size_t len,
::std::ostream * os )

Definition at line 795 of file gtest-printers.h.

795 {
796 if (len == 0) {
797 *os << "{}";
798 } else {
799 *os << "{ ";
800 const size_t kThreshold = 18;
801 const size_t kChunkSize = 8;
802 // If the array has more than kThreshold elements, we'll have to
803 // omit some details by printing only the first and the last
804 // kChunkSize elements.
805 // TODO(wan@google.com): let the user control the threshold using a flag.
806 if (len <= kThreshold) {
807 PrintRawArrayTo(begin, len, os);
808 } else {
809 PrintRawArrayTo(begin, kChunkSize, os);
810 *os << ", ..., ";
811 PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
812 }
813 *os << " }";
814 }
815}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UniversalPrintArray() [4/5]

GTEST_API_ void testing::internal::UniversalPrintArray ( const wchar_t * begin,
size_t len,
::std::ostream * os )

◆ UniversalPrintArray() [5/5]

void testing::internal::UniversalPrintArray ( const wchar_t * begin,
size_t len,
ostream * os )

Definition at line 325 of file gtest-printers.cc.

325 {
326 UniversalPrintCharArray(begin, len, os);
327}

◆ UniversalTersePrint()

template<typename T >
void testing::internal::UniversalTersePrint ( const T & value,
::std::ostream * os )

Definition at line 922 of file gtest-printers.h.

Here is the call graph for this function:

◆ WideStringToUtf8()

std::string testing::internal::WideStringToUtf8 ( const wchar_t * str,
int num_chars )

Definition at line 1838 of file gtest.cc.

1838 {
1839 if (num_chars == -1)
1840 num_chars = static_cast<int>(wcslen(str));
1841
1842 ::std::stringstream stream;
1843 for (int i = 0; i < num_chars; ++i) {
1844 UInt32 unicode_code_point;
1845
1846 if (str[i] == L'\0') {
1847 break;
1848 } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) {
1849 unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i],
1850 str[i + 1]);
1851 i++;
1852 } else {
1853 unicode_code_point = static_cast<UInt32>(str[i]);
1854 }
1855
1856 stream << CodePointToUtf8(unicode_code_point);
1857 }
1858 return StringStreamToString(&stream);
1859}
GTEST_API_ std::string StringStreamToString(::std::stringstream *stream)
Definition gtest.cc:1997
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteToShardStatusFileIfNeeded()

void testing::internal::WriteToShardStatusFileIfNeeded ( )

Definition at line 5106 of file gtest.cc.

5106 {
5107 const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);
5108 if (test_shard_file != NULL) {
5109 FILE* const file = posix::FOpen(test_shard_file, "w");
5110 if (file == NULL) {
5111 ColoredPrintf(COLOR_RED,
5112 "Could not write to the test shard status file \"%s\" "
5113 "specified by the %s environment variable.\n",
5114 test_shard_file, kTestShardStatusFile);
5115 fflush(stdout);
5116 exit(EXIT_FAILURE);
5117 }
5118 fclose(file);
5119 }
5120}
FILE * FOpen(const char *path, const char *mode)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_argvs

::std::vector<std::string> testing::internal::g_argvs

Definition at line 396 of file gtest.cc.

◆ g_gmock_implicit_sequence

GTEST_API_ ThreadLocal< Sequence * > testing::internal::g_gmock_implicit_sequence

Definition at line 275 of file gmock-spec-builders.cc.

◆ g_help_flag

bool testing::internal::g_help_flag = false

Definition at line 183 of file gtest.cc.

◆ GTEST_ATTRIBUTE_UNUSED_

class testing::internal::GTestFlagSaver testing::internal::GTEST_ATTRIBUTE_UNUSED_

◆ kAlsoRunDisabledTestsFlag

const char testing::internal::kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests"

Definition at line 81 of file gtest-internal-inl.h.

◆ kBreakOnFailureFlag

const char testing::internal::kBreakOnFailureFlag[] = "break_on_failure"

Definition at line 82 of file gtest-internal-inl.h.

◆ kCatchExceptionsFlag

const char testing::internal::kCatchExceptionsFlag[] = "catch_exceptions"

Definition at line 83 of file gtest-internal-inl.h.

◆ kColorFlag

const char testing::internal::kColorFlag[] = "color"

Definition at line 84 of file gtest-internal-inl.h.

◆ kCurrentDirectoryString

const char testing::internal::kCurrentDirectoryString[] = "./"

Definition at line 84 of file gtest-filepath.cc.

◆ kDeathTestStyleFlag

const char testing::internal::kDeathTestStyleFlag[] = "death_test_style"

Definition at line 49 of file gtest-death-test-internal.h.

◆ kDeathTestUseFork

const char testing::internal::kDeathTestUseFork[] = "death_test_use_fork"

Definition at line 50 of file gtest-death-test-internal.h.

◆ kErrorVerbosity

const char testing::internal::kErrorVerbosity[] = "error"

Definition at line 331 of file gmock-internal-utils.h.

◆ kFilterFlag

const char testing::internal::kFilterFlag[] = "filter"

Definition at line 85 of file gtest-internal-inl.h.

◆ kFlagfileFlag

const char testing::internal::kFlagfileFlag[] = "flagfile"

Definition at line 96 of file gtest-internal-inl.h.

◆ kInfoVerbosity

const char testing::internal::kInfoVerbosity[] = "info"

Definition at line 327 of file gmock-internal-utils.h.

◆ kInternalRunDeathTestFlag

const char testing::internal::kInternalRunDeathTestFlag[] = "internal_run_death_test"

Definition at line 51 of file gtest-death-test-internal.h.

◆ kListTestsFlag

const char testing::internal::kListTestsFlag[] = "list_tests"

Definition at line 86 of file gtest-internal-inl.h.

◆ kMaxBiggestInt

const BiggestInt testing::internal::kMaxBiggestInt
Initial value:
=
~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1))
long long BiggestInt

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

◆ kMaxCodePoint1

const UInt32 testing::internal::kMaxCodePoint1 = (static_cast<UInt32>(1) << 7) - 1

Definition at line 1748 of file gtest.cc.

◆ kMaxCodePoint2

const UInt32 testing::internal::kMaxCodePoint2 = (static_cast<UInt32>(1) << (5 + 6)) - 1

Definition at line 1751 of file gtest.cc.

◆ kMaxCodePoint3

const UInt32 testing::internal::kMaxCodePoint3 = (static_cast<UInt32>(1) << (4 + 2*6)) - 1

Definition at line 1754 of file gtest.cc.

◆ kMaxCodePoint4

const UInt32 testing::internal::kMaxCodePoint4 = (static_cast<UInt32>(1) << (3 + 3*6)) - 1

Definition at line 1757 of file gtest.cc.

◆ kMaxRandomSeed

const int testing::internal::kMaxRandomSeed = 99999

Definition at line 99 of file gtest-internal-inl.h.

◆ kOutputFlag

const char testing::internal::kOutputFlag[] = "output"

Definition at line 87 of file gtest-internal-inl.h.

◆ kPathSeparator

const char testing::internal::kPathSeparator = '/'

Definition at line 83 of file gtest-filepath.cc.

◆ kPrintTimeFlag

const char testing::internal::kPrintTimeFlag[] = "print_time"

Definition at line 88 of file gtest-internal-inl.h.

◆ kPrintUTF8Flag

const char testing::internal::kPrintUTF8Flag[] = "print_utf8"

Definition at line 89 of file gtest-internal-inl.h.

◆ kRandomSeedFlag

const char testing::internal::kRandomSeedFlag[] = "random_seed"

Definition at line 90 of file gtest-internal-inl.h.

◆ kRepeatFlag

const char testing::internal::kRepeatFlag[] = "repeat"

Definition at line 91 of file gtest-internal-inl.h.

◆ kShuffleFlag

const char testing::internal::kShuffleFlag[] = "shuffle"

Definition at line 92 of file gtest-internal-inl.h.

◆ kStackTraceDepthFlag

const char testing::internal::kStackTraceDepthFlag[] = "stack_trace_depth"

Definition at line 93 of file gtest-internal-inl.h.

◆ kStackTraceMarker

const char testing::internal::kStackTraceMarker = "\nStack trace:\n"

Definition at line 179 of file gtest.cc.

◆ kStdErrFileno

const int testing::internal::kStdErrFileno = STDERR_FILENO

Definition at line 86 of file gtest-port.cc.

◆ kStdOutFileno

const int testing::internal::kStdOutFileno = STDOUT_FILENO

Definition at line 85 of file gtest-port.cc.

◆ kStreamResultToFlag

const char testing::internal::kStreamResultToFlag[] = "stream_result_to"

Definition at line 94 of file gtest-internal-inl.h.

◆ kTestTypeIdInGoogleTest

const TypeId testing::internal::kTestTypeIdInGoogleTest = GetTestTypeId()
extern

Definition at line 643 of file gtest.cc.

◆ kThrowOnFailureFlag

const char testing::internal::kThrowOnFailureFlag[] = "throw_on_failure"

Definition at line 95 of file gtest-internal-inl.h.

◆ kTypedTestCases

const int testing::internal::kTypedTestCases = 0

Definition at line 107 of file gtest-unittest-api_test.cc.

◆ kTypedTests

const int testing::internal::kTypedTests = 0

Definition at line 108 of file gtest-unittest-api_test.cc.

◆ kUnknownFile

const char testing::internal::kUnknownFile[] = "unknown file"

Definition at line 892 of file gtest-port.cc.

◆ kWarningVerbosity

const char testing::internal::kWarningVerbosity[] = "warning"

Definition at line 329 of file gmock-internal-utils.h.