Lines Matching refs:reporter
12 static void check_alloc(skiatest::Reporter* reporter, const SkChunkAlloc& alloc, in check_alloc() argument
14 REPORTER_ASSERT(reporter, alloc.totalCapacity() >= capacity); in check_alloc()
15 REPORTER_ASSERT(reporter, alloc.totalUsed() == used); in check_alloc()
16 SkDEBUGCODE(REPORTER_ASSERT(reporter, alloc.blockCount() == numBlocks);) in check_alloc()
19 static void* simple_alloc(skiatest::Reporter* reporter, SkChunkAlloc* alloc, size_t size) { in simple_alloc() argument
21 check_alloc(reporter, *alloc, size, size, 1); in simple_alloc()
22 REPORTER_ASSERT(reporter, alloc->contains(ptr)); in simple_alloc()
26 static void test_chunkalloc(skiatest::Reporter* reporter) { in test_chunkalloc() argument
32 check_alloc(reporter, alloc, 0, 0, 0); in test_chunkalloc()
33 REPORTER_ASSERT(reporter, !alloc.contains(nullptr)); in test_chunkalloc()
34 REPORTER_ASSERT(reporter, !alloc.contains(reporter)); in test_chunkalloc()
38 check_alloc(reporter, alloc, 0, 0, 0); in test_chunkalloc()
42 check_alloc(reporter, alloc, 0, 0, 0); in test_chunkalloc()
47 void* ptr = simple_alloc(reporter, &alloc, size); in test_chunkalloc()
50 check_alloc(reporter, alloc, 0, 0, 0); in test_chunkalloc()
51 REPORTER_ASSERT(reporter, !alloc.contains(ptr)); in test_chunkalloc()
55 ptr = simple_alloc(reporter, &alloc, size); in test_chunkalloc()
58 check_alloc(reporter, alloc, size, 0, 1); in test_chunkalloc()
59 REPORTER_ASSERT(reporter, !alloc.contains(ptr)); in test_chunkalloc()
62 ptr = simple_alloc(reporter, &alloc, size); in test_chunkalloc()
67 ptr = simple_alloc(reporter, &alloc, size); in test_chunkalloc()
70 check_alloc(reporter, alloc, 2*kMin, size+kMin, 2); in test_chunkalloc()
71 REPORTER_ASSERT(reporter, alloc.contains(ptr)); in test_chunkalloc()
76 REPORTER_ASSERT(reporter, freed == kMin); in test_chunkalloc()
77 check_alloc(reporter, alloc, 2*kMin, size, 2); in test_chunkalloc()
78 REPORTER_ASSERT(reporter, !alloc.contains(ptr)); in test_chunkalloc()
118 static void test_16(skiatest::Reporter* reporter) { in test_16() argument
128 compare16(reporter, buffer, 0, PAD + alignment); in test_16()
129 compare16(reporter, base, VALUE16, count); in test_16()
130 compare16(reporter, base + count, 0, TOTAL - count - PAD - alignment); in test_16()
135 static void test_32(skiatest::Reporter* reporter) { in test_32() argument
145 compare32(reporter, buffer, 0, PAD + alignment); in test_32()
146 compare32(reporter, base, VALUE32, count); in test_32()
147 compare32(reporter, base + count, 0, TOTAL - count - PAD - alignment); in test_32()
157 DEF_TEST(Memset, reporter) { in DEF_TEST() argument
158 test_16(reporter); in DEF_TEST()
159 test_32(reporter); in DEF_TEST()
161 test_chunkalloc(reporter); in DEF_TEST()