Lines Matching refs:REPORTER_ASSERT

80     REPORTER_ASSERT(r, stack.preallocSize() == sizeof(SkBlockAllocator));
81 REPORTER_ASSERT(r, stack.preallocUsableSpace() == (size_t) stack.currentBlock()->avail());
87 REPORTER_ASSERT(r, placement->preallocSize() == 1024);
88 REPORTER_ASSERT(r, placement->preallocUsableSpace() < 1024 &&
96 REPORTER_ASSERT(r, inlined->preallocSize() == 2048);
97 REPORTER_ASSERT(r, inlined->preallocUsableSpace() < 2048 &&
111 REPORTER_ASSERT(r, pt % align == 0);
113 REPORTER_ASSERT(r, br.fEnd - br.fAlignedOffset >= size);
115 REPORTER_ASSERT(r, br.fAlignedOffset - br.fStart >= 0);
116 REPORTER_ASSERT(r, br.fAlignedOffset - br.fStart <= align - 1);
118 REPORTER_ASSERT(r, pool->currentBlock() == br.fBlock);
124 REPORTER_ASSERT(r, pt > prevEnd);
151 REPORTER_ASSERT(r, total_size(pool) == pool->preallocSize());
161 REPORTER_ASSERT(r, pool->currentBlock()->avail<4>() < 4);
164 REPORTER_ASSERT(r, total_size(pool) > pool->preallocSize());
171 REPORTER_ASSERT(r, total_size(pool) > currentSize);
174 REPORTER_ASSERT(r, total_size(pool) - currentSize < 4096);
178 REPORTER_ASSERT(r, total_size(pool) >= currentSize + 4096);
188 REPORTER_ASSERT(r, p.fBlock->avail<4>() > 16);
189 REPORTER_ASSERT(r, p.fBlock->resize(p.fStart, p.fEnd, 16));
196 REPORTER_ASSERT(r, reinterpret_cast<uintptr_t>(pNext.fBlock->ptr(pNext.fAlignedOffset)) -
198 REPORTER_ASSERT(r, p.fBlock == pNext.fBlock);
199 REPORTER_ASSERT(r, !p.fBlock->resize(p.fStart, p.fEnd, 48));
202 REPORTER_ASSERT(r, p.fBlock->release(pNext.fStart, pNext.fEnd));
204 REPORTER_ASSERT(r, p.fBlock->resize(p.fStart, p.fEnd, fillBlock));
210 REPORTER_ASSERT(r, p.fBlock->avail<4>() < fillBlock);
211 REPORTER_ASSERT(r, !p.fBlock->resize(p.fStart, p.fEnd, fillBlock));
215 REPORTER_ASSERT(r, p.fBlock->resize(p.fStart, p.fEnd, shrinkTo32));
217 REPORTER_ASSERT(r, p.fEnd - p.fStart == 32);
222 REPORTER_ASSERT(r, reinterpret_cast<uintptr_t>(pNext.fBlock->ptr(pNext.fAlignedOffset)) -
230 REPORTER_ASSERT(r, !pNext.fBlock->resize(pNext.fStart, pNext.fEnd, shrinkTo0 - 1));
232 REPORTER_ASSERT(r, pNext.fBlock->resize(pNext.fStart, pNext.fEnd, shrinkTo0));
241 REPORTER_ASSERT(r, pool->currentBlock()->release(p.fStart, p.fEnd));
244 REPORTER_ASSERT(r, p.fStart == p2.fStart);
249 REPORTER_ASSERT(r, !p2.fBlock->release(p2.fStart, p2.fEnd));
255 REPORTER_ASSERT(r, p5.fBlock->release(p5.fStart, p5.fEnd));
256 REPORTER_ASSERT(r, p4.fBlock->release(p4.fStart, p4.fEnd));
257 REPORTER_ASSERT(r, p2.fBlock->release(p2.fStart, p3.fEnd));
261 REPORTER_ASSERT(r, !p.fBlock->release(p.fStart, p.fEnd - 16));
262 REPORTER_ASSERT(r, !p.fBlock->release(p.fStart, p.fEnd + 16));
263 REPORTER_ASSERT(r, p.fBlock->release(p.fStart, p.fEnd));
283 REPORTER_ASSERT(r, br.fBlock->release(br.fStart, br.fEnd));
289 REPORTER_ASSERT(r, pool->allocate<4>(16).fStart == ptrs[0].fStart);
310 REPORTER_ASSERT(r, kExpectedSizes[gp][0] == total_size(pool));
312 REPORTER_ASSERT(r, kExpectedSizes[gp][i] == add_block(pool));
333 REPORTER_ASSERT(r, block_count(pool) == 4); // 3 added plus the implicit head
342 REPORTER_ASSERT(r,block_count(pool) == 1);
343 REPORTER_ASSERT(r, pool->preallocSize() == pool->totalSize());
344 REPORTER_ASSERT(r, get_block(pool, 0)->metadata() == 0);
346 REPORTER_ASSERT(r, firstAlloc == alloc_byte(pool));
347 REPORTER_ASSERT(r, 2 * kBlockIncrement == add_block(pool));
348 REPORTER_ASSERT(r, 3 * kBlockIncrement == add_block(pool));
374 REPORTER_ASSERT(r, total_size(pool) == b1Size + b2Size + b3Size + b4Size);
376 REPORTER_ASSERT(r, block_count(pool) == 3);
377 REPORTER_ASSERT(r, get_block(pool, 1)->metadata() == 3);
378 REPORTER_ASSERT(r, total_size(pool) == b1Size + b3Size + b4Size);
381 REPORTER_ASSERT(r, block_count(pool) == 2);
382 REPORTER_ASSERT(r, get_block(pool, 1)->metadata() == 4);
383 REPORTER_ASSERT(r, total_size(pool) == b1Size + b4Size);
386 REPORTER_ASSERT(r, block_count(pool) == 1);
387 REPORTER_ASSERT(r, total_size(pool) == b1Size);
393 REPORTER_ASSERT(r, size == b2Size);
398 REPORTER_ASSERT(r, total_size(pool) == pool->preallocSize());
399 REPORTER_ASSERT(r, block_count(pool) == 1);
400 REPORTER_ASSERT(r, firstAlloc == alloc_byte(pool));
401 REPORTER_ASSERT(r, get_block(pool, 0)->metadata() == 0); // metadata reset too
408 REPORTER_ASSERT(r, block_count(pool) == 3);
427 REPORTER_ASSERT(r, releaseCount == 4);
429 REPORTER_ASSERT(r, pool->headBlock()->metadata() == 0);
430 REPORTER_ASSERT(r, block_count(pool) == 1);
444 REPORTER_ASSERT(r, releaseCount == 4);
446 REPORTER_ASSERT(r, pool->headBlock()->metadata() == 0);
447 REPORTER_ASSERT(r, block_count(pool) == 1);
454 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) == 0);
459 REPORTER_ASSERT(r, pool->totalSize() == total);
460 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) == added);
464 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) == 0);
470 REPORTER_ASSERT(r, (size_t) pool->currentBlock()->avail() == avail);
472 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) >= reserve &&
478 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) == 0);
479 REPORTER_ASSERT(r, pool->totalSize() == preAllocTotalSize);
484 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) == 0);
488 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) > 0);
494 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) > 0 &&
503 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) >= scratchAvail);
509 REPORTER_ASSERT(r, pool->currentBlock() != oldTail);
510 REPORTER_ASSERT(r, BlockAllocatorTestAccess::ScratchBlockSize(pool) == scratchAvail);
529 REPORTER_ASSERT(r, block_count(poolA) == 4);
530 REPORTER_ASSERT(r, block_count(poolB) == 3);
538 REPORTER_ASSERT(r, block_count(poolA) == 6);
539 REPORTER_ASSERT(r, block_count(poolB) == 1);
540 REPORTER_ASSERT(r, poolB->preallocSize() == poolB->totalSize());
541 REPORTER_ASSERT(r, poolA->totalSize() == aSize + theftSize);
543 REPORTER_ASSERT(r, *bAlloc == 't');
544 REPORTER_ASSERT(r, (uintptr_t) poolA->findOwningBlock(bAlloc) == (uintptr_t) allocOwner);
545 REPORTER_ASSERT(r, !poolB->findOwningBlock(bAlloc));
549 REPORTER_ASSERT(r, block_count(poolA) == 6);
550 REPORTER_ASSERT(r, block_count(poolB) == 1);
572 REPORTER_ASSERT(r, p1.fAlignedOffset - p1.fStart >= (int) sizeof(TestMeta));
575 REPORTER_ASSERT(r, reinterpret_cast<uintptr_t>(meta) % alignof(TestMeta) == 0);
576 REPORTER_ASSERT(r, reinterpret_cast<uintptr_t>(p1.fBlock->ptr(p1.fAlignedOffset)) % 16 == 0);
586 REPORTER_ASSERT(r, p2.fAlignedOffset - p2.fStart >= (int) sizeof(TestMetaBig));
590 REPORTER_ASSERT(r, reinterpret_cast<uintptr_t>(metaBig) % alignof(TestMetaBig) == 0);
591 REPORTER_ASSERT(r, reinterpret_cast<uintptr_t>(p2.fBlock->ptr(p2.fAlignedOffset)) % 16 == 0);
597 REPORTER_ASSERT(r, meta->fX1 == 2 && meta->fX2 == 5);
598 REPORTER_ASSERT(r, metaBig->fX1 == 3 && metaBig->fX2 == 6);
605 REPORTER_ASSERT(r, pool->metadata() == 0); // initial value
608 REPORTER_ASSERT(r, pool->metadata() == 4);
613 REPORTER_ASSERT(r, pool->metadata() == 4);
617 REPORTER_ASSERT(r, pool->metadata() == 0);
628 REPORTER_ASSERT(r, block == br.fBlock);
631 REPORTER_ASSERT(r, block == br.fBlock);
634 REPORTER_ASSERT(r, block == br.fBlock);