| 203 | } |
| 204 | |
| 205 | void ReadTestData(Reader & r) |
| 206 | { |
| 207 | string s; |
| 208 | r.ReadAsString(s); |
| 209 | for (size_t i = 0; i < CHUNKS_COUNT; ++i) |
| 210 | for (size_t j = 0; j < CHUNK_SIZE; ++j) |
| 211 | TEST_EQUAL(s[i * CHUNK_SIZE + j], static_cast<char>(i), (i, j)); |
| 212 | string const sub = s.substr(CHUNKS_COUNT * CHUNK_SIZE); |
| 213 | TEST_EQUAL(sub, TEST_STRING, (sub, TEST_STRING)); |
| 214 | } |
| 215 | template <typename WriterType> |
| 216 | void WriteToFileAndTest() |
| 217 | { |
no test coverage detected