Xmipp  v3.23.11-Nereus
Static Public Member Functions | List of all members
testing::internal::ContainerPrinter Struct Reference

#include <gtest-printers.h>

Static Public Member Functions

template<typename T , typename = typename std::enable_if< (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) && !IsRecursiveContainer<T>::value>::type>
static void PrintValue (const T &container, std::ostream *os)
 

Detailed Description

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

Member Function Documentation

◆ PrintValue()

template<typename T , typename = typename std::enable_if< (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) && !IsRecursiveContainer<T>::value>::type>
static void testing::internal::ContainerPrinter::PrintValue ( const T &  container,
std::ostream *  os 
)
inlinestatic

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

134  {
135  const size_t kMaxCount = 32; // The maximum number of elements to print.
136  *os << '{';
137  size_t count = 0;
138  for (auto&& elem : container) {
139  if (count > 0) {
140  *os << ',';
141  if (count == kMaxCount) { // Enough has been printed.
142  *os << " ...";
143  break;
144  }
145  }
146  *os << ' ';
147  // We cannot call PrintTo(elem, os) here as PrintTo() doesn't
148  // handle `elem` being a native array.
149  internal::UniversalPrint(elem, os);
150  ++count;
151  }
152 
153  if (count > 0) {
154  *os << ' ';
155  }
156  *os << '}';
157  }
void UniversalPrint(const T &value, ::std::ostream *os)

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