Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Enumerations | Functions
googletest-printers-test.cc File Reference
#include <ctype.h>
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <deque>
#include <forward_list>
#include <limits>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "gtest/gtest-printers.h"
#include "gtest/gtest.h"
Include dependency graph for googletest-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 >
 
class  foo::PathLike
 
struct  foo::PathLike::iterator
 
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

 foo
 
 testing
 
 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 >
std::string testing::gtest_printers_test::Print (const T &value)
 
template<typename T >
std::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 (PrintCharTest, Char16)
 
 testing::gtest_printers_test::TEST (PrintCharTest, Char32)
 
 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 std::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 (PrintCharPointerTest, Char16)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, ConstChar16)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, Char32)
 
 testing::gtest_printers_test::TEST (PrintCharPointerTest, ConstChar32)
 
 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>
std::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, Char16Array)
 
 testing::gtest_printers_test::TEST (PrintArrayTest, Char32Array)
 
 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)
 
 testing::gtest_printers_test::TEST (PrintStringTest, U16String)
 
 testing::gtest_printers_test::TEST (PrintStringTest, U32String)
 
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, OneElementHashMap)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, HashMultiMap)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, HashSet)
 
 testing::gtest_printers_test::TEST (PrintStlContainerTest, HashMultiSet)
 
 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, SinglyLinkedList)
 
 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 (PrintStdTupleTest, VariousSizes)
 
 testing::gtest_printers_test::TEST (PrintStdTupleTest, NestedTuple)
 
 testing::gtest_printers_test::TEST (PrintNullptrT, Basic)
 
 testing::gtest_printers_test::TEST (PrintReferenceWrapper, Printable)
 
 testing::gtest_printers_test::TEST (PrintReferenceWrapper, Unprintable)
 
 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 (PrintStreamableTypeTest, PathLikeInUserNamespace)
 
 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 (PrintToStringTest, ContainsNonLatin)
 
 testing::gtest_printers_test::TEST (IsValidUTF8Test, IllFormedUTF8)
 
 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)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsEmptyTuple)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsOneTuple)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsTwoTuple)
 
 testing::gtest_printers_test::TEST (UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsTersely)
 

Macro Definition Documentation

#define EXPECT_PRINT_TO_STRING_ (   value,
  expected_string 
)
Value:
EXPECT_TRUE(PrintToString(value) == (expected_string)) \
<< " where " #value " prints as " << (PrintToString(value))
::std::string PrintToString(const T &value)
int value
#define EXPECT_TRUE(condition)
Definition: gtest.h:1979

Definition at line 1447 of file googletest-printers-test.cc.

Enumeration Type Documentation

Enumerator
kAE1 
kAE2 

Definition at line 58 of file googletest-printers-test.cc.

Enumerator
kEWP1 
kEWP2 

Definition at line 64 of file googletest-printers-test.cc.

Enumerator
kEWS1 

Definition at line 70 of file googletest-printers-test.cc.

Enumerator
kEWPT1 

Definition at line 79 of file googletest-printers-test.cc.

Function Documentation

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

Definition at line 74 of file googletest-printers-test.cc.

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

Definition at line 83 of file googletest-printers-test.cc.

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

Definition at line 108 of file googletest-printers-test.cc.

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

Definition at line 112 of file googletest-printers-test.cc.

Variable Documentation

const char* data_

Definition at line 1747 of file googletest-printers-test.cc.

size_t size_

Definition at line 1748 of file googletest-printers-test.cc.