MCPcopy Create free account
hub / github.com/catboost/catboost / TestImpl

Function TestImpl

util/stream/hex_ut.cpp:7–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6Y_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.";

Callers 1

Y_UNIT_TESTFunction · 0.70

Calls 4

HexEncodeFunction · 0.70
HexDecodeFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected