• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef GOOGLE_PROTOBUF_UNREDACTED_DEBUG_FORMAT_FOR_TEST_H__
2 #define GOOGLE_PROTOBUF_UNREDACTED_DEBUG_FORMAT_FOR_TEST_H__
3 
4 #include "google/protobuf/message.h"
5 #include "google/protobuf/message_lite.h"
6 
7 namespace google {
8 namespace protobuf {
9 namespace util {
10 
11 // Generates a human-readable form of this message for debugging purposes in
12 // test-only code. This API does not redact any fields in the message.
13 std::string UnredactedDebugFormatForTest(const google::protobuf::Message& message);
14 // Like UnredactedDebugFormatForTest(), but prints the message in a single line.
15 std::string UnredactedShortDebugFormatForTest(const google::protobuf::Message& message);
16 // Like UnredactedDebugFormatForTest(), but does not escape UTF-8 byte
17 // sequences.
18 std::string UnredactedUtf8DebugFormatForTest(const google::protobuf::Message& message);
19 
20 // The following APIs are added just to work with code that interoperates with
21 // `Message` and `MessageLite`.
22 
23 std::string UnredactedDebugFormatForTest(const google::protobuf::MessageLite& message);
24 std::string UnredactedShortDebugFormatForTest(
25     const google::protobuf::MessageLite& message);
26 std::string UnredactedUtf8DebugFormatForTest(
27     const google::protobuf::MessageLite& message);
28 
29 }  // namespace util
30 }  // namespace protobuf
31 }  // namespace google
32 
33 #endif  // GOOGLE_PROTOBUF_UNREDACTED_DEBUG_FORMAT_FOR_TEST_H__
34