is the quoted version of and represents the original string mentioned in the test case. This method compares the unescaped against its round trip version i.e. after carrying out escaping followed by unescaping on it.
| 76 | // This method compares the unescaped <unquoted> against its round trip version |
| 77 | // i.e. after carrying out escaping followed by unescaping on it. |
| 78 | void TestBytesEscaping(const std::string& unquoted, const std::string& quoted) { |
| 79 | ASSERT_OK_AND_ASSIGN(auto unescaped, UnescapeBytes(unquoted)); |
| 80 | const std::string escaped = EscapeBytes(unescaped); |
| 81 | ASSERT_OK_AND_ASSIGN(auto unescaped2, UnescapeBytes(escaped)); |
| 82 | EXPECT_EQ(unescaped, unescaped2); |
| 83 | std::string escaped2 = EscapeBytes(unescaped, true); |
| 84 | ASSERT_OK_AND_ASSIGN(auto unescaped3, UnescapeBytes(escaped2)); |
| 85 | EXPECT_EQ(unescaped, unescaped3); |
| 86 | } |
| 87 | |
| 88 | // <quoted> takes a byte literal of the form b'...', b'''...''' |
| 89 | void TestBytesLiteral(const std::string& quoted) { |
no test coverage detected