| 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; |
nothing calls this directly
no test coverage detected