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

Function Y_UNIT_TEST

library/cpp/http/io/chunk_ut.cpp:60–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 Y_UNIT_TEST(TestChunkedIo) {
61 TTempFile tmpFile(CDATA);
62 TString tmp;
63
64 {
65 TUnbufferedFileOutput fo(CDATA);
66 TChunkedOutput co(&fo);
67 WriteTestData(&co, &tmp);
68 }
69
70 {
71 TUnbufferedFileInput fi(CDATA);
72 TChunkedInput ci(&fi);
73 TString r;
74
75 ReadInSmallChunks(&ci, &r);
76
77 UNIT_ASSERT_EQUAL(r, tmp);
78 }
79
80 {
81 TUnbufferedFileInput fi(CDATA);
82 TChunkedInput ci(&fi);
83 TString r;
84
85 ReadCombed(&ci, &r, 11);
86
87 UNIT_ASSERT_EQUAL(r, CombString(tmp, 11));
88 }
89 }
90
91 Y_UNIT_TEST(TestBadChunk) {
92 bool hasError = false;

Callers

nothing calls this directly

Calls 7

WriteTestDataFunction · 0.85
ReadInSmallChunksFunction · 0.85
ReadCombedFunction · 0.85
CombStringFunction · 0.85
TransferDataFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected