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

Function TestStreamReadTo1

util/stream/ios_ut.cpp:333–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331 "123",
332 "\t\r "};
333 void TestStreamReadTo1(IInputStream& input, const char* comment) {
334 TString tmp;
335 input.ReadTo(tmp, 'c');
336 UNIT_ASSERT_VALUES_EQUAL_C(tmp, "111a222b333", comment);
337
338 char tmp2;
339 input.Read(&tmp2, 1);
340 UNIT_ASSERT_VALUES_EQUAL_C(tmp2, '4', comment);
341
342 input.ReadTo(tmp, '6');
343 UNIT_ASSERT_VALUES_EQUAL_C(tmp, "44d555e", comment);
344
345 tmp = input.ReadAll();
346 UNIT_ASSERT_VALUES_EQUAL_C(tmp, "66f", comment);
347 }
348
349 void TestStreamReadTo2(IInputStream& input, const char* comment) {
350 TString s;

Callers

nothing calls this directly

Calls 3

ReadAllMethod · 0.80
ReadToMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected