Lines Matching refs:pchunks
225 PeekMemchunks16 pchunks(&pool); in test_peek_memchunks_append() local
233 pchunks.append(b.data(), b.size()); in test_peek_memchunks_append()
235 CU_ASSERT(32 == pchunks.rleft()); in test_peek_memchunks_append()
236 CU_ASSERT(32 == pchunks.rleft_buffered()); in test_peek_memchunks_append()
238 CU_ASSERT(0 == pchunks.remove(nullptr, 0)); in test_peek_memchunks_append()
240 CU_ASSERT(32 == pchunks.rleft()); in test_peek_memchunks_append()
241 CU_ASSERT(32 == pchunks.rleft_buffered()); in test_peek_memchunks_append()
243 CU_ASSERT(12 == pchunks.remove(d.data(), 12)); in test_peek_memchunks_append()
247 CU_ASSERT(20 == pchunks.rleft()); in test_peek_memchunks_append()
248 CU_ASSERT(32 == pchunks.rleft_buffered()); in test_peek_memchunks_append()
250 CU_ASSERT(20 == pchunks.remove(d.data(), d.size())); in test_peek_memchunks_append()
254 CU_ASSERT(0 == pchunks.rleft()); in test_peek_memchunks_append()
255 CU_ASSERT(32 == pchunks.rleft_buffered()); in test_peek_memchunks_append()
260 PeekMemchunks16 pchunks(&pool); in test_peek_memchunks_disable_peek_drain() local
268 pchunks.append(b.data(), b.size()); in test_peek_memchunks_disable_peek_drain()
270 CU_ASSERT(12 == pchunks.remove(d.data(), 12)); in test_peek_memchunks_disable_peek_drain()
272 pchunks.disable_peek(true); in test_peek_memchunks_disable_peek_drain()
274 CU_ASSERT(!pchunks.peeking); in test_peek_memchunks_disable_peek_drain()
275 CU_ASSERT(20 == pchunks.rleft()); in test_peek_memchunks_disable_peek_drain()
276 CU_ASSERT(20 == pchunks.rleft_buffered()); in test_peek_memchunks_disable_peek_drain()
278 CU_ASSERT(20 == pchunks.remove(d.data(), d.size())); in test_peek_memchunks_disable_peek_drain()
282 CU_ASSERT(0 == pchunks.rleft()); in test_peek_memchunks_disable_peek_drain()
283 CU_ASSERT(0 == pchunks.rleft_buffered()); in test_peek_memchunks_disable_peek_drain()
288 PeekMemchunks16 pchunks(&pool); in test_peek_memchunks_disable_peek_no_drain() local
296 pchunks.append(b.data(), b.size()); in test_peek_memchunks_disable_peek_no_drain()
298 CU_ASSERT(12 == pchunks.remove(d.data(), 12)); in test_peek_memchunks_disable_peek_no_drain()
300 pchunks.disable_peek(false); in test_peek_memchunks_disable_peek_no_drain()
302 CU_ASSERT(!pchunks.peeking); in test_peek_memchunks_disable_peek_no_drain()
303 CU_ASSERT(32 == pchunks.rleft()); in test_peek_memchunks_disable_peek_no_drain()
304 CU_ASSERT(32 == pchunks.rleft_buffered()); in test_peek_memchunks_disable_peek_no_drain()
306 CU_ASSERT(32 == pchunks.remove(d.data(), d.size())); in test_peek_memchunks_disable_peek_no_drain()
310 CU_ASSERT(0 == pchunks.rleft()); in test_peek_memchunks_disable_peek_no_drain()
311 CU_ASSERT(0 == pchunks.rleft_buffered()); in test_peek_memchunks_disable_peek_no_drain()
316 PeekMemchunks16 pchunks(&pool); in test_peek_memchunks_reset() local
324 pchunks.append(b.data(), b.size()); in test_peek_memchunks_reset()
326 CU_ASSERT(12 == pchunks.remove(d.data(), 12)); in test_peek_memchunks_reset()
328 pchunks.disable_peek(true); in test_peek_memchunks_reset()
329 pchunks.reset(); in test_peek_memchunks_reset()
331 CU_ASSERT(0 == pchunks.rleft()); in test_peek_memchunks_reset()
332 CU_ASSERT(0 == pchunks.rleft_buffered()); in test_peek_memchunks_reset()
334 CU_ASSERT(nullptr == pchunks.cur); in test_peek_memchunks_reset()
335 CU_ASSERT(nullptr == pchunks.cur_pos); in test_peek_memchunks_reset()
336 CU_ASSERT(nullptr == pchunks.cur_last); in test_peek_memchunks_reset()
337 CU_ASSERT(pchunks.peeking); in test_peek_memchunks_reset()