Lines Matching refs:reporter

23 static void test_refCnt(skiatest::Reporter* reporter) {
32 REPORTER_ASSERT(reporter, ref->unique());
53 static void test_weakRefCnt(skiatest::Reporter* reporter) {
66 REPORTER_ASSERT(reporter, ref->unique());
67 SkDEBUGCODE(REPORTER_ASSERT(reporter, ref->getWeakCnt() == 1));
71 DEF_TEST(RefCnt, reporter) {
72 test_refCnt(reporter);
73 test_weakRefCnt(reporter);
83 #define check(reporter, ref, unref, make, kill) \
84 REPORTER_ASSERT(reporter, gRefCounter == ref); \
85 REPORTER_ASSERT(reporter, gUnrefCounter == unref); \
86 REPORTER_ASSERT(reporter, gNewCounter == make); \
87 REPORTER_ASSERT(reporter, gDeleteCounter == kill)
150 DEF_TEST(sk_sp, reporter) {
154 REPORTER_ASSERT(reporter, paint.fEffect.get() == nullptr);
155 REPORTER_ASSERT(reporter, !paint.get());
156 check(reporter, 0, 0, 0, 0);
159 check(reporter, 0, 0, 1, 0);
160 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 1);
163 REPORTER_ASSERT(reporter, true);
165 REPORTER_ASSERT(reporter, false);
168 REPORTER_ASSERT(reporter, false);
170 REPORTER_ASSERT(reporter, true);
174 check(reporter, 0, 1, 1, 1);
177 REPORTER_ASSERT(reporter, false);
179 REPORTER_ASSERT(reporter, true);
182 REPORTER_ASSERT(reporter, true);
184 REPORTER_ASSERT(reporter, false);
188 REPORTER_ASSERT(reporter, sizeof(e) == sizeof(void*));
190 check(reporter, 0, 1, 2, 1);
192 check(reporter, 1, 1, 2, 1);
193 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 2);
197 check(reporter, 2, 1, 2, 1);
198 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 3);
202 check(reporter, 2, 1, 2, 1);
206 check(reporter, 2, 1, 2, 1);
211 check(reporter, 2, 4, 2, 2);
216 check(reporter, 0, 0, 0, 0);
218 REPORTER_ASSERT(reporter, !foo);
220 REPORTER_ASSERT(reporter, foo);
221 check(reporter, 0, 0, 1, 0);
223 check(reporter, 0, 1, 1, 1);
228 check(reporter, 0, 0, 1, 0);
230 check(reporter, 0, 1, 1, 1);
234 check(reporter, 0, 0, 1, 0);
236 check(reporter, 0, 0, 1, 0);
237 REPORTER_ASSERT(reporter, !baz); // NOLINT(bugprone-use-after-move)
239 check(reporter, 0, 1, 1, 1);
246 check(reporter, 1, 0, 1, 0);
247 REPORTER_ASSERT(reporter, bar1);
248 REPORTER_ASSERT(reporter, bar2);
249 REPORTER_ASSERT(reporter, bar1 == bar2);
250 REPORTER_ASSERT(reporter, bar2 == bar1);
251 REPORTER_ASSERT(reporter, !(bar1 != bar2));
252 REPORTER_ASSERT(reporter, !(bar2 != bar1));
255 check(reporter, 2, 0, 1, 0);
258 check(reporter, 2, 3, 1, 1);
263 check(reporter, 0, 0, 1, 0);
265 check(reporter, 1, 0, 1, 0);
267 check(reporter, 1, 1, 1, 0);
269 check(reporter, 1, 2, 1, 1);
274 REPORTER_ASSERT(reporter, empty == sk_sp<SkRefCnt>());
276 REPORTER_ASSERT(reporter, notEmpty != empty);
277 REPORTER_ASSERT(reporter, empty != notEmpty);
279 REPORTER_ASSERT(reporter, nullptr == empty);
280 REPORTER_ASSERT(reporter, empty == nullptr);
281 REPORTER_ASSERT(reporter, empty == empty);
287 REPORTER_ASSERT(reporter, a != b);
288 REPORTER_ASSERT(reporter, a == a);