tesseract v5.3.3.20231005
testing::internal::ProtobufPrinter Struct Reference

#include <gtest-printers.h>

Static Public Member Functions

template<typename T , typename = typename std::enable_if< internal::HasDebugStringAndShortDebugString<T>::value>::type>
static void PrintValue (const T &value, ::std::ostream *os)
 

Static Public Attributes

static const size_t kProtobufOneLinerMaxLength = 50
 

Detailed Description

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

Member Function Documentation

◆ PrintValue()

template<typename T , typename = typename std::enable_if< internal::HasDebugStringAndShortDebugString<T>::value>::type>
static void testing::internal::ProtobufPrinter::PrintValue ( const T &  value,
::std::ostream *  os 
)
inlinestatic

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

230 {
231 std::string pretty_str = value.ShortDebugString();
232 if (pretty_str.length() > kProtobufOneLinerMaxLength) {
233 pretty_str = "\n" + value.DebugString();
234 }
235 *os << ("<" + pretty_str + ">");
236 }
int value
static const size_t kProtobufOneLinerMaxLength

Member Data Documentation

◆ kProtobufOneLinerMaxLength

const size_t testing::internal::ProtobufPrinter::kProtobufOneLinerMaxLength = 50
static

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


The documentation for this struct was generated from the following file: