Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtest-printers_test.cc File Reference
#include "gtest/gtest-printers.h"
#include <ctype.h>
#include <limits.h>
#include <string.h>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "gtest/gtest.h"
+ Include dependency graph for gtest-printers_test.cc:

Go to the source code of this file.

Classes

class  BiggestIntConvertible
 
class  UnprintableTemplateInGlobal< T >
 
class  StreamableInGlobal
 
class  foo::UnprintableInFoo
 
struct  foo::PrintableViaPrintTo
 
struct  foo::PointerPrintable
 
class  foo::PrintableViaPrintToTemplate< T >
 
class  foo::StreamableTemplateInFoo< T >
 
struct  testing::gtest_printers_test::Foo
 
class  testing::gtest_printers_test::AllowsGenericStreaming
 
class  testing::gtest_printers_test::AllowsGenericStreamingTemplate< T >
 
class  testing::gtest_printers_test::AllowsGenericStreamingAndImplicitConversionTemplate< T >
 
struct  testing::gtest_printers_test::iterator
 
struct  testing::gtest_printers_test::const_iterator
 
struct  testing::gtest_printers_test::Big
 

Namespaces

namespace  foo
 
namespace  testing
 
namespace  testing::gtest_printers_test
 

Macros

#define EXPECT_PRINT_TO_STRING_(value, expected_string)
 

Enumerations

enum  AnonymousEnum { kAE1 = -1, kAE2 = 1 }
 
enum  EnumWithoutPrinter { kEWP1 = -2, kEWP2 = 42 }
 
enum  EnumWithStreaming { kEWS1 = 10 }
 
enum  EnumWithPrintTo { kEWPT1 = 1 }
 

Functions

std::ostream & operator<< (std::ostream &os, EnumWithStreaming e)
 
void PrintTo (EnumWithPrintTo e, std::ostream *os)
 
void operator<< (::std::ostream &os, const StreamableInGlobal &)
 
void operator<< (::std::ostream &os, const StreamableInGlobal *)
 
void foo::PrintTo (const PrintableViaPrintTo &x,::std::ostream *os)
 
::std::ostream & foo::operator<< (::std::ostream &os, const PointerPrintable *)
 
template<typename T >
void foo::PrintTo (const PrintableViaPrintToTemplate< T > &x,::std::ostream *os)
 
template<typename T >
inline::std::ostream & foo::operator<< (::std::ostream &os, const StreamableTemplateInFoo< T > &x)
 
template<typename T >
string testing::gtest_printers_test::Print (const T &value)
 
template<typename T >
string testing::gtest_printers_test::PrintByRef (const T &value)
 
 testing::gtest_printers_test::TEST (PrintEnumTest, AnonymousEnum)
 
 testing::gtest_printers_test::TEST (PrintEnumTest, EnumWithoutPrinter)
 
 testing::gtest_printers_test::TEST (PrintEnumTest, EnumWithStreaming)
 
 testing::gtest_printers_test::TEST (PrintEnumTest, EnumWithPrintTo)
 
 testing::gtest_printers_test::TEST (PrintClassTest, BiggestIntConvertible)
 
 testing::gtest_printers_test::TEST (PrintCharTest, PlainChar)
 
 testing::gtest_printers_test::TEST (PrintCharTest, SignedChar)
 
 testing::gtest_printers_test::TEST (PrintCharTest, UnsignedChar)
 
 testing::gtest_printers_test::TEST (PrintBuiltInTypeTest, Bool)
 
 testing::gtest_printers_test::TEST (PrintBuiltInTypeTest, Wchar_t)
 
 testing::gtest_printers_test::TEST (PrintTypeSizeTest, Wchar_t)
 
 testing::gtest_printers_test::TEST (PrintBuiltInTypeTest, Integer)
 
 testing::gtest_printers_test::TEST (PrintBuiltInTypeTest, Size_t)
 
 testing::gtest_printers_test::TEST (PrintBuiltInTypeTest, FloatingPoints)
 
static string testing::gtest_printers_test::PrintPointer (const void *p)
 
 testing::gtest_printers_test::TEST (PrintCStringTest, Const)
 
 testing::gtest_printers_test::TEST (PrintCStringTest, NonConst)
 
 testing::gtest_printers_test::TEST (PrintCStringTest, Null)
 
 testing::gtest_printers_test::TEST (PrintCStringTest, EscapesProperly)
 
 testing::gtest_printers_test::TEST (PrintWideCStringTest, Const)
 
 testing::gtest_printers_test::TEST (PrintWideCStringTest, NonConst)
 
 testing::gtest_printers_test::TEST (PrintWideCStringTest, Null)
 
 testing::gtest_printers_test::TEST (PrintWideCStringTest, EscapesProperly)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, SignedChar)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, ConstSignedChar)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, UnsignedChar)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, ConstUnsignedChar)
 
 testing::gtest_printers_test::TEST (PrintPointerToBuiltInTypeTest, Bool)
 
 testing::gtest_printers_test::TEST (PrintPointerToBuiltInTypeTest, Void)
 
 testing::gtest_printers_test::TEST (PrintPointerToBuiltInTypeTest, ConstVoid)
 
 testing::gtest_printers_test::TEST (PrintPointerToPointerTest, IntPointerPointer)
 
void testing::gtest_printers_test::MyFunction (int)
 
 testing::gtest_printers_test::TEST (PrintPointerTest, NonMemberFunctionPointer)
 
template<typename StringType >
AssertionResult testing::gtest_printers_test::HasPrefix (const StringType &str, const StringType &prefix)
 
 testing::gtest_printers_test::TEST (PrintPointerTest, MemberVariablePointer)
 
 testing::gtest_printers_test::TEST (PrintPointerTest, MemberFunctionPointer)
 
template<typename T , size_t N>
string testing::gtest_printers_test::PrintArrayHelper (T(&a)[N])
 
 testing::gtest_printers_test::TEST (PrintArrayTest, OneDimensionalArray)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, TwoDimensionalArray)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, ConstArray)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, CharArrayWithNoTerminatingNul)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, ConstCharArrayWithTerminatingNul)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, WCharArrayWithNoTerminatingNul)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, WConstCharArrayWithTerminatingNul)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, ObjectArray)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, BigArray)
 
 testing::gtest_printers_test::TEST (PrintStringTest, StringInStdNamespace)
 
 testing::gtest_printers_test::TEST (PrintStringTest, StringAmbiguousHex)
 
template<typename Char , typename CharTraits >
std::basic_ostream< Char,
CharTraits > & 
testing::gtest_printers_test::operator<< (std::basic_ostream< Char, CharTraits > &os, const AllowsGenericStreaming &)
 
 testing::gtest_printers_test::TEST (PrintTypeWithGenericStreamingTest, NonTemplateType)
 
template<typename Char , typename CharTraits , typename T >
std::basic_ostream< Char,
CharTraits > & 
testing::gtest_printers_test::operator<< (std::basic_ostream< Char, CharTraits > &os, const AllowsGenericStreamingTemplate< T > &)
 
 testing::gtest_printers_test::TEST (PrintTypeWithGenericStreamingTest, TemplateType)
 
template<typename Char , typename CharTraits , typename T >
std::basic_ostream< Char,
CharTraits > & 
testing::gtest_printers_test::operator<< (std::basic_ostream< Char, CharTraits > &os, const AllowsGenericStreamingAndImplicitConversionTemplate< T > &)
 
 testing::gtest_printers_test::TEST (PrintTypeWithGenericStreamingTest, TypeImplicitlyConvertible)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, EmptyDeque)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, NonEmptyDeque)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, List)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, Map)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, MultiMap)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, Set)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, MultiSet)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, Pair)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, Vector)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, LongSequence)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, NestedContainer)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, OneDimensionalNativeArray)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, TwoDimensionalNativeArray)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, Iterator)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, ConstIterator)
 
 testing::gtest_printers_test::TEST (PrintUnprintableTypeTest, InGlobalNamespace)
 
 testing::gtest_printers_test::TEST (PrintUnprintableTypeTest, InUserNamespace)
 
 testing::gtest_printers_test::TEST (PrintUnpritableTypeTest, BigObject)
 
 testing::gtest_printers_test::TEST (PrintStreamableTypeTest, InGlobalNamespace)
 
 testing::gtest_printers_test::TEST (PrintStreamableTypeTest, TemplateTypeInUserNamespace)
 
 testing::gtest_printers_test::TEST (PrintPrintableTypeTest, InUserNamespace)
 
 testing::gtest_printers_test::TEST (PrintPrintableTypeTest, PointerInUserNamespace)
 
 testing::gtest_printers_test::TEST (PrintPrintableTypeTest, TemplateInUserNamespace)
 
 testing::gtest_printers_test::TEST (PrintReferenceTest, PrintsAddressAndValue)
 
 testing::gtest_printers_test::TEST (PrintReferenceTest, HandlesFunctionPointer)
 
 testing::gtest_printers_test::TEST (PrintReferenceTest, HandlesMemberFunctionPointer)
 
 testing::gtest_printers_test::TEST (PrintReferenceTest, HandlesMemberVariablePointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForScalar)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForNonCharPointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, FormatsNonCharArrayAsPointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForCharPointerVsPointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForWCharPointerVsPointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForCharPointerVsStdString)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForCharArrayVsPointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForCharArrayVsCharArray)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForWCharArrayVsPointer)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForWCharArrayVsWCharArray)
 
 testing::gtest_printers_test::TEST (FormatForComparisonFailureMessageTest, WorksForCharArrayVsStdString)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, WorksForScalar)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, WorksForPointerToConstChar)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, WorksForPointerToNonConstChar)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, EscapesForPointerToConstChar)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, EscapesForPointerToNonConstChar)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, WorksForArray)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, WorksForCharArray)
 
 testing::gtest_printers_test::TEST (PrintToStringTest, WorksForCharArrayWithEmbeddedNul)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTest, WorksForNonReference)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTest, WorksForReference)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTest, WorksForCString)
 
 testing::gtest_printers_test::TEST (UniversalPrintTest, WorksForNonReference)
 
 testing::gtest_printers_test::TEST (UniversalPrintTest, WorksForReference)
 
 testing::gtest_printers_test::TEST (UniversalPrintTest, WorksForCString)
 
 testing::gtest_printers_test::TEST (UniversalPrintTest, WorksForCharArray)
 

Macro Definition Documentation

#define EXPECT_PRINT_TO_STRING_ (   value,
  expected_string 
)
Value:
EXPECT_TRUE(PrintToString(value) == (expected_string)) \
<< " where " #value " prints as " << (PrintToString(value))

Definition at line 1446 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 1446 of file gtest-printers_test.cc

Referenced by testing::gtest_printers_test::TEST().

Enumeration Type Documentation

Enumerator:
kAE1 
kAE2 

Definition at line 68 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 68 of file gtest-printers_test.cc

Enumerator:
kEWP1 
kEWP2 

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

View newest version in sPHENIX GitHub at line 74 of file gtest-printers_test.cc

Enumerator:
kEWPT1 

Definition at line 89 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 89 of file gtest-printers_test.cc

Enumerator:
kEWS1 

Definition at line 80 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 80 of file gtest-printers_test.cc

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
EnumWithStreaming  e 
)

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

View newest version in sPHENIX GitHub at line 84 of file gtest-printers_test.cc

References kEWS1.

void operator<< ( ::std::ostream &  os,
const StreamableInGlobal  
)
inline

Definition at line 118 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 118 of file gtest-printers_test.cc

void operator<< ( ::std::ostream &  os,
const StreamableInGlobal  
)

Definition at line 122 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 122 of file gtest-printers_test.cc

void PrintTo ( EnumWithPrintTo  e,
std::ostream *  os 
)

Definition at line 93 of file gtest-printers_test.cc.

View newest version in sPHENIX GitHub at line 93 of file gtest-printers_test.cc

References kEWPT1.