| 5 | |
| 6 | Y_UNIT_TEST_SUITE(THexCodingTest) { |
| 7 | void TestImpl(const TString& data) { |
| 8 | TString encoded; |
| 9 | TStringOutput encodedOut(encoded); |
| 10 | HexEncode(data.data(), data.size(), encodedOut); |
| 11 | |
| 12 | UNIT_ASSERT_EQUAL(encoded.size(), data.size() * 2); |
| 13 | |
| 14 | TString decoded; |
| 15 | TStringOutput decodedOut(decoded); |
| 16 | HexDecode(encoded.data(), encoded.size(), decodedOut); |
| 17 | |
| 18 | UNIT_ASSERT_EQUAL(decoded, data); |
| 19 | } |
| 20 | |
| 21 | Y_UNIT_TEST(TestEncodeDecodeToStream) { |
| 22 | TString data = "100ABAcaba500,$%0987123456 \n\t\x01\x02\x03."; |
no test coverage detected