googletest/googletest/src/gtest-printers.cc
Go to the documentation of this file.
1 // Copyright 2007, Google Inc.
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are
6 // met:
7 //
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above
11 // copyright notice, this list of conditions and the following disclaimer
12 // in the documentation and/or other materials provided with the
13 // distribution.
14 // * Neither the name of Google Inc. nor the names of its
15 // contributors may be used to endorse or promote products derived from
16 // this software without specific prior written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 
30 
31 // Google Test - The Google C++ Testing and Mocking Framework
32 //
33 // This file implements a universal value printer that can print a
34 // value of any type T:
35 //
36 // void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
37 //
38 // It uses the << operator when possible, and prints the bytes in the
39 // object otherwise. A user can override its behavior for a class
40 // type Foo by defining either operator<<(::std::ostream&, const Foo&)
41 // or void PrintTo(const Foo&, ::std::ostream*) in the namespace that
42 // defines Foo.
43 
44 #include "gtest/gtest-printers.h"
45 
46 #include <stdio.h>
47 
48 #include <cctype>
49 #include <cstdint>
50 #include <cwchar>
51 #include <ostream> // NOLINT
52 #include <string>
53 #include <type_traits>
54 
55 #include "gtest/internal/gtest-port.h"
56 #include "src/gtest-internal-inl.h"
57 
58 namespace testing {
59 
60 namespace {
61 
62 using ::std::ostream;
63 
64 // Prints a segment of bytes in the given object.
69 void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,
70  size_t count, ostream* os) {
71  char text[5] = "";
72  for (size_t i = 0; i != count; i++) {
73  const size_t j = start + i;
74  if (i != 0) {
75  // Organizes the bytes into groups of 2 for easy parsing by
76  // human.
77  if ((j % 2) == 0)
78  *os << ' ';
79  else
80  *os << '-';
81  }
82  GTEST_SNPRINTF_(text, sizeof(text), "%02X", obj_bytes[j]);
83  *os << text;
84  }
85 }
86 
87 // Prints the bytes in the given value to the given ostream.
88 void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
89  ostream* os) {
90  // Tells the user how big the object is.
91  *os << count << "-byte object <";
92 
93  const size_t kThreshold = 132;
94  const size_t kChunkSize = 64;
95  // If the object size is bigger than kThreshold, we'll have to omit
96  // some details by printing only the first and the last kChunkSize
97  // bytes.
98  if (count < kThreshold) {
99  PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
100  } else {
101  PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
102  *os << " ... ";
103  // Rounds up to 2-byte boundary.
104  const size_t resume_pos = (count - kChunkSize + 1)/2*2;
105  PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
106  }
107  *os << ">";
108 }
109 
110 // Helpers for widening a character to char32_t. Since the standard does not
111 // specify if char / wchar_t is signed or unsigned, it is important to first
112 // convert it to the unsigned type of the same width before widening it to
113 // char32_t.
114 template <typename CharType>
115 char32_t ToChar32(CharType in) {
116  return static_cast<char32_t>(
117  static_cast<typename std::make_unsigned<CharType>::type>(in));
118 }
119 
120 } // namespace
121 
122 namespace internal {
123 
124 // Delegates to PrintBytesInObjectToImpl() to print the bytes in the
125 // given object. The delegation simplifies the implementation, which
126 // uses the << operator and thus is easier done outside of the
127 // ::testing::internal namespace, which contains a << operator that
128 // sometimes conflicts with the one in STL.
129 void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,
130  ostream* os) {
131  PrintBytesInObjectToImpl(obj_bytes, count, os);
132 }
133 
134 // Depending on the value of a char (or wchar_t), we print it in one
135 // of three formats:
136 // - as is if it's a printable ASCII (e.g. 'a', '2', ' '),
137 // - as a hexadecimal escape sequence (e.g. '\x7F'), or
138 // - as a special escape sequence (e.g. '\r', '\n').
140  kAsIs,
141  kHexEscape,
143 };
144 
145 // Returns true if c is a printable ASCII character. We test the
146 // value of c directly instead of calling isprint(), which is buggy on
147 // Windows Mobile.
148 inline bool IsPrintableAscii(char32_t c) { return 0x20 <= c && c <= 0x7E; }
149 
150 // Prints c (of type char, char8_t, char16_t, char32_t, or wchar_t) as a
151 // character literal without the quotes, escaping it when necessary; returns how
152 // c was formatted.
153 template <typename Char>
154 static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
155  const char32_t u_c = ToChar32(c);
156  switch (u_c) {
157  case L'\0':
158  *os << "\\0";
159  break;
160  case L'\'':
161  *os << "\\'";
162  break;
163  case L'\\':
164  *os << "\\\\";
165  break;
166  case L'\a':
167  *os << "\\a";
168  break;
169  case L'\b':
170  *os << "\\b";
171  break;
172  case L'\f':
173  *os << "\\f";
174  break;
175  case L'\n':
176  *os << "\\n";
177  break;
178  case L'\r':
179  *os << "\\r";
180  break;
181  case L'\t':
182  *os << "\\t";
183  break;
184  case L'\v':
185  *os << "\\v";
186  break;
187  default:
188  if (IsPrintableAscii(u_c)) {
189  *os << static_cast<char>(c);
190  return kAsIs;
191  } else {
192  ostream::fmtflags flags = os->flags();
193  *os << "\\x" << std::hex << std::uppercase << static_cast<int>(u_c);
194  os->flags(flags);
195  return kHexEscape;
196  }
197  }
198  return kSpecialEscape;
199 }
200 
201 // Prints a char32_t c as if it's part of a string literal, escaping it when
202 // necessary; returns how c was formatted.
203 static CharFormat PrintAsStringLiteralTo(char32_t c, ostream* os) {
204  switch (c) {
205  case L'\'':
206  *os << "'";
207  return kAsIs;
208  case L'"':
209  *os << "\\\"";
210  return kSpecialEscape;
211  default:
212  return PrintAsCharLiteralTo(c, os);
213  }
214 }
215 
216 static const char* GetCharWidthPrefix(char) {
217  return "";
218 }
219 
220 static const char* GetCharWidthPrefix(signed char) {
221  return "";
222 }
223 
224 static const char* GetCharWidthPrefix(unsigned char) {
225  return "";
226 }
227 
228 #ifdef __cpp_char8_t
229 static const char* GetCharWidthPrefix(char8_t) {
230  return "u8";
231 }
232 #endif
233 
234 static const char* GetCharWidthPrefix(char16_t) {
235  return "u";
236 }
237 
238 static const char* GetCharWidthPrefix(char32_t) {
239  return "U";
240 }
241 
242 static const char* GetCharWidthPrefix(wchar_t) {
243  return "L";
244 }
245 
246 // Prints a char c as if it's part of a string literal, escaping it when
247 // necessary; returns how c was formatted.
248 static CharFormat PrintAsStringLiteralTo(char c, ostream* os) {
249  return PrintAsStringLiteralTo(ToChar32(c), os);
250 }
251 
252 #ifdef __cpp_char8_t
253 static CharFormat PrintAsStringLiteralTo(char8_t c, ostream* os) {
254  return PrintAsStringLiteralTo(ToChar32(c), os);
255 }
256 #endif
257 
258 static CharFormat PrintAsStringLiteralTo(char16_t c, ostream* os) {
259  return PrintAsStringLiteralTo(ToChar32(c), os);
260 }
261 
262 static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) {
263  return PrintAsStringLiteralTo(ToChar32(c), os);
264 }
265 
266 // Prints a character c (of type char, char8_t, char16_t, char32_t, or wchar_t)
267 // and its code. '\0' is printed as "'\\0'", other unprintable characters are
268 // also properly escaped using the standard C++ escape sequence.
269 template <typename Char>
270 void PrintCharAndCodeTo(Char c, ostream* os) {
271  // First, print c as a literal in the most readable form we can find.
272  *os << GetCharWidthPrefix(c) << "'";
273  const CharFormat format = PrintAsCharLiteralTo(c, os);
274  *os << "'";
275 
276  // To aid user debugging, we also print c's code in decimal, unless
277  // it's 0 (in which case c was printed as '\\0', making the code
278  // obvious).
279  if (c == 0)
280  return;
281  *os << " (" << static_cast<int>(c);
282 
283  // For more convenience, we print c's code again in hexadecimal,
284  // unless c was already printed in the form '\x##' or the code is in
285  // [1, 9].
286  if (format == kHexEscape || (1 <= c && c <= 9)) {
287  // Do nothing.
288  } else {
289  *os << ", 0x" << String::FormatHexInt(static_cast<int>(c));
290  }
291  *os << ")";
292 }
293 
294 void PrintTo(unsigned char c, ::std::ostream* os) { PrintCharAndCodeTo(c, os); }
295 void PrintTo(signed char c, ::std::ostream* os) { PrintCharAndCodeTo(c, os); }
296 
297 // Prints a wchar_t as a symbol if it is printable or as its internal
298 // code otherwise and also as its code. L'\0' is printed as "L'\\0'".
299 void PrintTo(wchar_t wc, ostream* os) { PrintCharAndCodeTo(wc, os); }
300 
301 // TODO(dcheng): Consider making this delegate to PrintCharAndCodeTo() as well.
302 void PrintTo(char32_t c, ::std::ostream* os) {
303  *os << std::hex << "U+" << std::uppercase << std::setfill('0') << std::setw(4)
304  << static_cast<uint32_t>(c);
305 }
306 
307 // gcc/clang __{u,}int128_t
308 #if defined(__SIZEOF_INT128__)
309 void PrintTo(__uint128_t v, ::std::ostream* os) {
310  if (v == 0) {
311  *os << "0";
312  return;
313  }
314 
315  // Buffer large enough for ceil(log10(2^128))==39 and the null terminator
316  char buf[40];
317  char* p = buf + sizeof(buf);
318 
319  // Some configurations have a __uint128_t, but no support for built in
320  // division. Do manual long division instead.
321 
322  uint64_t high = static_cast<uint64_t>(v >> 64);
323  uint64_t low = static_cast<uint64_t>(v);
324 
325  *--p = 0;
326  while (high != 0 || low != 0) {
327  uint64_t high_mod = high % 10;
328  high = high / 10;
329  // This is the long division algorithm specialized for a divisor of 10 and
330  // only two elements.
331  // Notable values:
332  // 2^64 / 10 == 1844674407370955161
333  // 2^64 % 10 == 6
334  const uint64_t carry = 6 * high_mod + low % 10;
335  low = low / 10 + high_mod * 1844674407370955161 + carry / 10;
336 
337  char digit = static_cast<char>(carry % 10);
338  *--p = '0' + digit;
339  }
340  *os << p;
341 }
342 void PrintTo(__int128_t v, ::std::ostream* os) {
343  __uint128_t uv = static_cast<__uint128_t>(v);
344  if (v < 0) {
345  *os << "-";
346  uv = -uv;
347  }
348  PrintTo(uv, os);
349 }
350 #endif // __SIZEOF_INT128__
351 
352 // Prints the given array of characters to the ostream. CharType must be either
353 // char, char8_t, char16_t, char32_t, or wchar_t.
354 // The array starts at begin, the length is len, it may include '\0' characters
355 // and may not be NUL-terminated.
356 template <typename CharType>
362  const CharType* begin, size_t len, ostream* os) {
363  const char* const quote_prefix = GetCharWidthPrefix(*begin);
364  *os << quote_prefix << "\"";
365  bool is_previous_hex = false;
366  CharFormat print_format = kAsIs;
367  for (size_t index = 0; index < len; ++index) {
368  const CharType cur = begin[index];
369  if (is_previous_hex && IsXDigit(cur)) {
370  // Previous character is of '\x..' form and this character can be
371  // interpreted as another hexadecimal digit in its number. Break string to
372  // disambiguate.
373  *os << "\" " << quote_prefix << "\"";
374  }
375  is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;
376  // Remember if any characters required hex escaping.
377  if (is_previous_hex) {
378  print_format = kHexEscape;
379  }
380  }
381  *os << "\"";
382  return print_format;
383 }
384 
385 // Prints a (const) char/wchar_t array of 'len' elements, starting at address
386 // 'begin'. CharType must be either char or wchar_t.
387 template <typename CharType>
393  const CharType* begin, size_t len, ostream* os) {
394  // The code
395  // const char kFoo[] = "foo";
396  // generates an array of 4, not 3, elements, with the last one being '\0'.
397  //
398  // Therefore when printing a char array, we don't print the last element if
399  // it's '\0', such that the output matches the string literal as it's
400  // written in the source code.
401  if (len > 0 && begin[len - 1] == '\0') {
402  PrintCharsAsStringTo(begin, len - 1, os);
403  return;
404  }
405 
406  // If, however, the last element in the array is not '\0', e.g.
407  // const char kFoo[] = { 'f', 'o', 'o' };
408  // we must print the entire array. We also print a message to indicate
409  // that the array is not NUL-terminated.
411  *os << " (no terminating NUL)";
412 }
413 
414 // Prints a (const) char array of 'len' elements, starting at address 'begin'.
415 void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
417 }
418 
419 #ifdef __cpp_char8_t
420 // Prints a (const) char8_t array of 'len' elements, starting at address
421 // 'begin'.
422 void UniversalPrintArray(const char8_t* begin, size_t len, ostream* os) {
424 }
425 #endif
426 
427 // Prints a (const) char16_t array of 'len' elements, starting at address
428 // 'begin'.
429 void UniversalPrintArray(const char16_t* begin, size_t len, ostream* os) {
431 }
432 
433 // Prints a (const) char32_t array of 'len' elements, starting at address
434 // 'begin'.
435 void UniversalPrintArray(const char32_t* begin, size_t len, ostream* os) {
437 }
438 
439 // Prints a (const) wchar_t array of 'len' elements, starting at address
440 // 'begin'.
441 void UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) {
443 }
444 
445 namespace {
446 
447 // Prints a null-terminated C-style string to the ostream.
448 template <typename Char>
449 void PrintCStringTo(const Char* s, ostream* os) {
450  if (s == nullptr) {
451  *os << "NULL";
452  } else {
453  *os << ImplicitCast_<const void*>(s) << " pointing to ";
455  }
456 }
457 
458 } // anonymous namespace
459 
460 void PrintTo(const char* s, ostream* os) { PrintCStringTo(s, os); }
461 
462 #ifdef __cpp_char8_t
463 void PrintTo(const char8_t* s, ostream* os) { PrintCStringTo(s, os); }
464 #endif
465 
466 void PrintTo(const char16_t* s, ostream* os) { PrintCStringTo(s, os); }
467 
468 void PrintTo(const char32_t* s, ostream* os) { PrintCStringTo(s, os); }
469 
470 // MSVC compiler can be configured to define whar_t as a typedef
471 // of unsigned short. Defining an overload for const wchar_t* in that case
472 // would cause pointers to unsigned shorts be printed as wide strings,
473 // possibly accessing more memory than intended and causing invalid
474 // memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when
475 // wchar_t is implemented as a native type.
476 #if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
477 // Prints the given wide C string to the ostream.
478 void PrintTo(const wchar_t* s, ostream* os) { PrintCStringTo(s, os); }
479 #endif // wchar_t is native
480 
481 namespace {
482 
483 bool ContainsUnprintableControlCodes(const char* str, size_t length) {
484  const unsigned char *s = reinterpret_cast<const unsigned char *>(str);
485 
486  for (size_t i = 0; i < length; i++) {
487  unsigned char ch = *s++;
488  if (std::iscntrl(ch)) {
489  switch (ch) {
490  case '\t':
491  case '\n':
492  case '\r':
493  break;
494  default:
495  return true;
496  }
497  }
498  }
499  return false;
500 }
501 
502 bool IsUTF8TrailByte(unsigned char t) { return 0x80 <= t && t<= 0xbf; }
503 
504 bool IsValidUTF8(const char* str, size_t length) {
505  const unsigned char *s = reinterpret_cast<const unsigned char *>(str);
506 
507  for (size_t i = 0; i < length;) {
508  unsigned char lead = s[i++];
509 
510  if (lead <= 0x7f) {
511  continue; // single-byte character (ASCII) 0..7F
512  }
513  if (lead < 0xc2) {
514  return false; // trail byte or non-shortest form
515  } else if (lead <= 0xdf && (i + 1) <= length && IsUTF8TrailByte(s[i])) {
516  ++i; // 2-byte character
517  } else if (0xe0 <= lead && lead <= 0xef && (i + 2) <= length &&
518  IsUTF8TrailByte(s[i]) &&
519  IsUTF8TrailByte(s[i + 1]) &&
520  // check for non-shortest form and surrogate
521  (lead != 0xe0 || s[i] >= 0xa0) &&
522  (lead != 0xed || s[i] < 0xa0)) {
523  i += 2; // 3-byte character
524  } else if (0xf0 <= lead && lead <= 0xf4 && (i + 3) <= length &&
525  IsUTF8TrailByte(s[i]) &&
526  IsUTF8TrailByte(s[i + 1]) &&
527  IsUTF8TrailByte(s[i + 2]) &&
528  // check for non-shortest form
529  (lead != 0xf0 || s[i] >= 0x90) &&
530  (lead != 0xf4 || s[i] < 0x90)) {
531  i += 3; // 4-byte character
532  } else {
533  return false;
534  }
535  }
536  return true;
537 }
538 
539 void ConditionalPrintAsText(const char* str, size_t length, ostream* os) {
540  if (!ContainsUnprintableControlCodes(str, length) &&
541  IsValidUTF8(str, length)) {
542  *os << "\n As Text: \"" << str << "\"";
543  }
544 }
545 
546 } // anonymous namespace
547 
548 void PrintStringTo(const ::std::string& s, ostream* os) {
549  if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
550  if (GTEST_FLAG_GET(print_utf8)) {
551  ConditionalPrintAsText(s.data(), s.size(), os);
552  }
553  }
554 }
555 
556 #ifdef __cpp_char8_t
557 void PrintU8StringTo(const ::std::u8string& s, ostream* os) {
558  PrintCharsAsStringTo(s.data(), s.size(), os);
559 }
560 #endif
561 
562 void PrintU16StringTo(const ::std::u16string& s, ostream* os) {
563  PrintCharsAsStringTo(s.data(), s.size(), os);
564 }
565 
566 void PrintU32StringTo(const ::std::u32string& s, ostream* os) {
567  PrintCharsAsStringTo(s.data(), s.size(), os);
568 }
569 
570 #if GTEST_HAS_STD_WSTRING
571 void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
572  PrintCharsAsStringTo(s.data(), s.size(), os);
573 }
574 #endif // GTEST_HAS_STD_WSTRING
575 
576 } // namespace internal
577 
578 } // namespace testing
xds_interop_client.str
str
Definition: xds_interop_client.py:487
testing
Definition: aws_request_signer_test.cc:25
testing::internal::PrintU16StringTo
GTEST_API_ void PrintU16StringTo(const ::std::u16string &s, ::std::ostream *os)
http2_test_server.format
format
Definition: http2_test_server.py:118
absl::str_format_internal::LengthMod::j
@ j
testing::internal::PrintU32StringTo
GTEST_API_ void PrintU32StringTo(const ::std::u32string &s, ::std::ostream *os)
testing::internal::IsXDigit
bool IsXDigit(char ch)
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:1935
fix_build_deps.c
list c
Definition: fix_build_deps.py:490
begin
char * begin
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1007
testing::internal::PrintStringTo
GTEST_API_ void PrintStringTo(const ::std::string &s, ::std::ostream *os)
GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
#define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:823
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
#define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:799
testing::internal::PrintCharAndCodeTo
void PrintCharAndCodeTo(Char c, ostream *os)
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:221
testing::internal::PrintAsStringLiteralTo
static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream *os)
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:196
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
testing::internal::kAsIs
@ kAsIs
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:129
absl::FormatConversionChar::s
@ s
testing::internal::String::FormatHexInt
static std::string FormatHexInt(int value)
Definition: bloaty/third_party/googletest/googletest/src/gtest.cc:1985
kChunkSize
static constexpr size_t kChunkSize
Definition: chunked_vector_fuzzer.cc:29
xds_manager.p
p
Definition: xds_manager.py:60
testing::internal::PrintCharsAsStringTo
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ CharFormat PrintCharsAsStringTo(const CharType *begin, size_t len, ostream *os)
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:267
testing::gmock_generated_actions_test::Char
char Char(char ch)
Definition: bloaty/third_party/googletest/googlemock/test/gmock-generated-actions_test.cc:63
testing::internal::kHexEscape
@ kHexEscape
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:130
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
in
const char * in
Definition: third_party/abseil-cpp/absl/strings/internal/str_format/parser_test.cc:391
start
static uint64_t start
Definition: benchmark-pound.c:74
gen_server_registered_method_bad_client_test_body.text
def text
Definition: gen_server_registered_method_bad_client_test_body.py:50
setup.v
v
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:42
testing::internal::PrintBytesInObjectTo
GTEST_API_ void PrintBytesInObjectTo(const unsigned char *obj_bytes, size_t count, ::std::ostream *os)
testing::internal::CharFormat
CharFormat
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:128
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
testing::internal::UniversalPrintArray
void UniversalPrintArray(const T *begin, size_t len, ::std::ostream *os)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest-printers.h:730
testing::internal::wstring
::std::wstring wstring
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:887
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
#define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:811
testing::internal::PrintAsCharLiteralTo
static CharFormat PrintAsCharLiteralTo(Char c, ostream *os)
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:146
testing::internal::GetCharWidthPrefix
static const char * GetCharWidthPrefix(char)
Definition: googletest/googletest/src/gtest-printers.cc:216
memory_diff.cur
def cur
Definition: memory_diff.py:83
testing::internal::IsPrintableAscii
bool IsPrintableAscii(wchar_t c)
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:137
absl::flags_internal
Definition: abseil-cpp/absl/flags/commandlineflag.h:40
count
int * count
Definition: bloaty/third_party/googletest/googlemock/test/gmock_stress_test.cc:96
absl::str_format_internal::LengthMod::t
@ t
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
L
lua_State * L
Definition: upb/upb/bindings/lua/main.c:35
testing::internal::PrintWideStringTo
void PrintWideStringTo(const ::std::wstring &s, ostream *os)
Definition: gmock-gtest-all.cc:10172
testing::internal::UniversalPrintCharArray
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ void UniversalPrintCharArray(const CharType *begin, size_t len, ostream *os)
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:298
google::protobuf::python::IsValidUTF8
bool IsValidUTF8(PyObject *obj)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/message.cc:707
GTEST_SNPRINTF_
#define GTEST_SNPRINTF_
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:2094
GTEST_FLAG_GET
#define GTEST_FLAG_GET(name)
Definition: googletest/googletest/include/gtest/internal/gtest-port.h:2218
internal
Definition: benchmark/test/output_test_helper.cc:20
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
ch
char ch
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3621
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
length
std::size_t length
Definition: abseil-cpp/absl/time/internal/test_util.cc:57
testing::internal::kSpecialEscape
@ kSpecialEscape
Definition: bloaty/third_party/googletest/googletest/src/gtest-printers.cc:131
testing::internal::PrintTo
void PrintTo(const T &value, ::std::ostream *os)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest-printers.h:483
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
#define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:787


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:48