Lines Matching refs:reporter
33 static void test_autounref(skiatest::Reporter* reporter) { in test_autounref() argument
35 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
38 REPORTER_ASSERT(reporter, &obj == tmp.get()); in test_autounref()
39 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
41 REPORTER_ASSERT(reporter, &obj == tmp.release()); in test_autounref()
42 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
43 REPORTER_ASSERT(reporter, nullptr == tmp.release()); in test_autounref()
44 REPORTER_ASSERT(reporter, nullptr == tmp.get()); in test_autounref()
47 REPORTER_ASSERT(reporter, !obj.unique()); in test_autounref()
51 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
54 static void test_autostarray(skiatest::Reporter* reporter) { in test_autostarray() argument
57 REPORTER_ASSERT(reporter, obj0.unique()); in test_autostarray()
58 REPORTER_ASSERT(reporter, obj1.unique()); in test_autostarray()
62 REPORTER_ASSERT(reporter, 0 == tmp.count()); in test_autostarray()
66 REPORTER_ASSERT(reporter, 4 == tmp.count()); in test_autostarray()
69 REPORTER_ASSERT(reporter, !obj0.unique()); in test_autostarray()
70 REPORTER_ASSERT(reporter, !obj1.unique()); in test_autostarray()
74 REPORTER_ASSERT(reporter, 0 == tmp.count()); in test_autostarray()
75 REPORTER_ASSERT(reporter, obj0.unique()); in test_autostarray()
76 REPORTER_ASSERT(reporter, obj1.unique()); in test_autostarray()
79 REPORTER_ASSERT(reporter, 2 == tmp.count()); in test_autostarray()
85 REPORTER_ASSERT(reporter, obj0.unique()); in test_autostarray()
86 REPORTER_ASSERT(reporter, obj1.unique()); in test_autostarray()
91 REPORTER_ASSERT(reporter, 4 == tmp.count()); in test_autostarray()
95 REPORTER_ASSERT(reporter, !obj0.unique()); in test_autostarray()
96 REPORTER_ASSERT(reporter, !obj1.unique()); in test_autostarray()
100 REPORTER_ASSERT(reporter, obj0.unique()); in test_autostarray()
101 REPORTER_ASSERT(reporter, obj1.unique()); in test_autostarray()
106 REPORTER_ASSERT(reporter, !obj0.unique()); in test_autostarray()
107 REPORTER_ASSERT(reporter, !obj1.unique()); in test_autostarray()
110 REPORTER_ASSERT(reporter, obj0.unique()); in test_autostarray()
111 REPORTER_ASSERT(reporter, obj1.unique()); in test_autostarray()
115 REPORTER_ASSERT(reporter, !obj0.unique()); in test_autostarray()
116 REPORTER_ASSERT(reporter, !obj1.unique()); in test_autostarray()
119 REPORTER_ASSERT(reporter, obj0.unique()); in test_autostarray()
120 REPORTER_ASSERT(reporter, obj1.unique()); in test_autostarray()
127 static void test_search(skiatest::Reporter* reporter) { in test_search() argument
138 REPORTER_ASSERT(reporter, array[i-1] <= array[i]); in test_search()
144 REPORTER_ASSERT(reporter, index == i); in test_search()
154 REPORTER_ASSERT(reporter, in test_search()
158 REPORTER_ASSERT(reporter, index <= kSEARCH_COUNT); in test_search()
160 REPORTER_ASSERT(reporter, value < array[index]); in test_search()
162 REPORTER_ASSERT(reporter, value > array[index - 1]); in test_search()
166 REPORTER_ASSERT(reporter, value > array[kSEARCH_COUNT - 1]); in test_search()
172 DEF_TEST(Utils, reporter) { in DEF_TEST() argument
173 test_search(reporter); in DEF_TEST()
174 test_autounref(reporter); in DEF_TEST()
175 test_autostarray(reporter); in DEF_TEST()
178 DEF_TEST(SkMakeSpan, reporter) { in DEF_TEST() argument
183 REPORTER_ASSERT(reporter, s[3] == 4); in DEF_TEST()
185 REPORTER_ASSERT(reporter, s[3] == 100); in DEF_TEST()
193 REPORTER_ASSERT(reporter, s[3] == 4); in DEF_TEST()
194 REPORTER_ASSERT(reporter, t[3] == 4); in DEF_TEST()
196 REPORTER_ASSERT(reporter, s[3] == 100); in DEF_TEST()
202 REPORTER_ASSERT(reporter, s[3] == 4); in DEF_TEST()
204 REPORTER_ASSERT(reporter, s[3] == 100); in DEF_TEST()
212 REPORTER_ASSERT(reporter, s[3] == 4); in DEF_TEST()
213 REPORTER_ASSERT(reporter, t[3] == 4); in DEF_TEST()
215 REPORTER_ASSERT(reporter, s[3] == 100); in DEF_TEST()
221 REPORTER_ASSERT(reporter, s.empty()); in DEF_TEST()
225 DEF_TEST(SkEnumerate, reporter) { in DEF_TEST() argument
232 REPORTER_ASSERT(reporter, i == check); in DEF_TEST()
233 REPORTER_ASSERT(reporter, v == (int)check+1); in DEF_TEST()
240 REPORTER_ASSERT(reporter, i == check); in DEF_TEST()
241 REPORTER_ASSERT(reporter, v == (int)check+1); in DEF_TEST()
249 REPORTER_ASSERT(reporter, i == check); in DEF_TEST()
250 REPORTER_ASSERT(reporter, v == (int)check+1); in DEF_TEST()
253 REPORTER_ASSERT(reporter, check == 4); in DEF_TEST()
257 REPORTER_ASSERT(reporter, i == check); in DEF_TEST()
258 REPORTER_ASSERT(reporter, v == (int)check+1); in DEF_TEST()
265 REPORTER_ASSERT(reporter, v == (int) i + 1); in DEF_TEST()
267 REPORTER_ASSERT(reporter, e.size() == 2); in DEF_TEST()
273 REPORTER_ASSERT(reporter, v == (int) i + 1); in DEF_TEST()
275 REPORTER_ASSERT(reporter, e.size() == 2); in DEF_TEST()
281 REPORTER_ASSERT(reporter, v == (int) i + 1); in DEF_TEST()
283 REPORTER_ASSERT(reporter, e.size() == 2); in DEF_TEST()
287 DEF_TEST(SkZip, reporter) { in DEF_TEST() argument
298 REPORTER_ASSERT(reporter, z.size() == 4); in DEF_TEST()
299 REPORTER_ASSERT(reporter, !z.empty()); in DEF_TEST()
304 REPORTER_ASSERT(reporter, std::get<0>(t) == 1); in DEF_TEST()
305 REPORTER_ASSERT(reporter, std::get<1>(t) == 10.f); in DEF_TEST()
306 REPORTER_ASSERT(reporter, std::get<2>(t) == 20); in DEF_TEST()
307 REPORTER_ASSERT(reporter, std::get<3>(t) == 100); in DEF_TEST()
308 REPORTER_ASSERT(reporter, std::get<4>(t) == 20); in DEF_TEST()
314 REPORTER_ASSERT(reporter, std::get<0>(t) == 4); in DEF_TEST()
315 REPORTER_ASSERT(reporter, std::get<1>(t) == 40.f); in DEF_TEST()
322 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
323 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
324 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
325 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
326 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
330 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
337 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
338 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
339 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
340 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
341 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
345 REPORTER_ASSERT(reporter, i = 2); in DEF_TEST()
354 REPORTER_ASSERT(reporter, a == A[i + 2]); in DEF_TEST()
355 REPORTER_ASSERT(reporter, b == B[i + 2]); in DEF_TEST()
356 REPORTER_ASSERT(reporter, c == C[i + 2]); in DEF_TEST()
357 REPORTER_ASSERT(reporter, d == D[i + 2]); in DEF_TEST()
358 REPORTER_ASSERT(reporter, s == S[i + 2]); in DEF_TEST()
362 REPORTER_ASSERT(reporter, i = 2); in DEF_TEST()
371 REPORTER_ASSERT(reporter, a == A[i + 1]); in DEF_TEST()
372 REPORTER_ASSERT(reporter, b == B[i + 1]); in DEF_TEST()
373 REPORTER_ASSERT(reporter, c == C[i + 1]); in DEF_TEST()
374 REPORTER_ASSERT(reporter, d == D[i + 1]); in DEF_TEST()
375 REPORTER_ASSERT(reporter, s == S[i + 1]); in DEF_TEST()
379 REPORTER_ASSERT(reporter, i = 2); in DEF_TEST()
387 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
388 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
389 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
390 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
391 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
395 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
403 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
404 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
405 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
406 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
407 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
411 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
417 REPORTER_ASSERT(reporter, in DEF_TEST()
424 REPORTER_ASSERT(reporter, span[1] == 20.f); in DEF_TEST()
431 REPORTER_ASSERT(reporter, a == 2); in DEF_TEST()
432 REPORTER_ASSERT(reporter, b == 20.f); in DEF_TEST()
433 REPORTER_ASSERT(reporter, c == 30); in DEF_TEST()
434 REPORTER_ASSERT(reporter, d == 200); in DEF_TEST()
435 REPORTER_ASSERT(reporter, e == 30); in DEF_TEST()
438 REPORTER_ASSERT(reporter, &a == &A[1]); in DEF_TEST()
439 REPORTER_ASSERT(reporter, &b == &B[1]); in DEF_TEST()
440 REPORTER_ASSERT(reporter, &c == &C[1]); in DEF_TEST()
441 REPORTER_ASSERT(reporter, &d == &D[1]); in DEF_TEST()
442 REPORTER_ASSERT(reporter, &e == &S[1]); in DEF_TEST()
452 REPORTER_ASSERT(reporter, std::get<0>(t1) == 20); in DEF_TEST()
453 REPORTER_ASSERT(reporter, std::get<1>(t1) == 20.f); in DEF_TEST()
454 REPORTER_ASSERT(reporter, std::get<2>(t1) == 300); in DEF_TEST()
455 REPORTER_ASSERT(reporter, std::get<3>(t1) == 2000); in DEF_TEST()
456 REPORTER_ASSERT(reporter, std::get<4>(t1) == 300); in DEF_TEST()
460 DEF_TEST(SkMakeZip, reporter) { in DEF_TEST() argument
473 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
474 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
475 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
476 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
477 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
478 REPORTER_ASSERT(reporter, p == P[i]); in DEF_TEST()
482 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
489 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
490 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
491 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
492 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
493 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
497 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
504 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
505 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
506 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
507 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
508 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
512 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
519 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
520 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
521 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
522 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
523 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
527 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
534 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
535 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
536 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
537 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
538 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
542 REPORTER_ASSERT(reporter, i = 4); in DEF_TEST()
549 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
550 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
551 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
552 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
553 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
561 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
562 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
563 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
564 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
565 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
572 REPORTER_ASSERT(reporter, a == A[i]); in DEF_TEST()
573 REPORTER_ASSERT(reporter, b == B[i]); in DEF_TEST()
574 REPORTER_ASSERT(reporter, c == C[i]); in DEF_TEST()
575 REPORTER_ASSERT(reporter, d == D[i]); in DEF_TEST()
576 REPORTER_ASSERT(reporter, s == S[i]); in DEF_TEST()
583 REPORTER_ASSERT(reporter, z.empty()); in DEF_TEST()
592 REPORTER_ASSERT(reporter, !z.empty()); in DEF_TEST()