Lines Matching refs:reporter
33 static void test_autounref(skiatest::Reporter* reporter) {
35 REPORTER_ASSERT(reporter, obj.unique());
38 REPORTER_ASSERT(reporter, &obj == tmp.get());
39 REPORTER_ASSERT(reporter, obj.unique());
41 REPORTER_ASSERT(reporter, &obj == tmp.release());
42 REPORTER_ASSERT(reporter, obj.unique());
43 REPORTER_ASSERT(reporter, nullptr == tmp.release());
44 REPORTER_ASSERT(reporter, nullptr == tmp.get());
47 REPORTER_ASSERT(reporter, !obj.unique());
51 REPORTER_ASSERT(reporter, obj.unique());
54 static void test_autostarray(skiatest::Reporter* reporter) {
57 REPORTER_ASSERT(reporter, obj0.unique());
58 REPORTER_ASSERT(reporter, obj1.unique());
62 REPORTER_ASSERT(reporter, 0 == tmp.count());
66 REPORTER_ASSERT(reporter, 4 == tmp.count());
69 REPORTER_ASSERT(reporter, !obj0.unique());
70 REPORTER_ASSERT(reporter, !obj1.unique());
74 REPORTER_ASSERT(reporter, 0 == tmp.count());
75 REPORTER_ASSERT(reporter, obj0.unique());
76 REPORTER_ASSERT(reporter, obj1.unique());
79 REPORTER_ASSERT(reporter, 2 == tmp.count());
85 REPORTER_ASSERT(reporter, obj0.unique());
86 REPORTER_ASSERT(reporter, obj1.unique());
91 REPORTER_ASSERT(reporter, 4 == tmp.count());
95 REPORTER_ASSERT(reporter, !obj0.unique());
96 REPORTER_ASSERT(reporter, !obj1.unique());
100 REPORTER_ASSERT(reporter, obj0.unique());
101 REPORTER_ASSERT(reporter, obj1.unique());
106 REPORTER_ASSERT(reporter, !obj0.unique());
107 REPORTER_ASSERT(reporter, !obj1.unique());
110 REPORTER_ASSERT(reporter, obj0.unique());
111 REPORTER_ASSERT(reporter, obj1.unique());
115 REPORTER_ASSERT(reporter, !obj0.unique());
116 REPORTER_ASSERT(reporter, !obj1.unique());
119 REPORTER_ASSERT(reporter, obj0.unique());
120 REPORTER_ASSERT(reporter, obj1.unique());
127 static void test_search(skiatest::Reporter* reporter) {
138 REPORTER_ASSERT(reporter, array[i-1] <= array[i]);
144 REPORTER_ASSERT(reporter, index == i);
154 REPORTER_ASSERT(reporter,
158 REPORTER_ASSERT(reporter, index <= kSEARCH_COUNT);
160 REPORTER_ASSERT(reporter, value < array[index]);
162 REPORTER_ASSERT(reporter, value > array[index - 1]);
166 REPORTER_ASSERT(reporter, value > array[kSEARCH_COUNT - 1]);
172 DEF_TEST(Utils, reporter) {
173 test_search(reporter);
174 test_autounref(reporter);
175 test_autostarray(reporter);
178 DEF_TEST(SkSpan, reporter) {
183 REPORTER_ASSERT(reporter, s[3] == 4);
185 REPORTER_ASSERT(reporter, s[3] == 100);
193 REPORTER_ASSERT(reporter, s[3] == 4);
194 REPORTER_ASSERT(reporter, t[3] == 4);
196 REPORTER_ASSERT(reporter, s[3] == 100);
202 REPORTER_ASSERT(reporter, s[3] == 4);
204 REPORTER_ASSERT(reporter, s[3] == 100);
206 REPORTER_ASSERT(reporter, s1.size() == 3);
207 REPORTER_ASSERT(reporter, s1.front() == 2);
208 REPORTER_ASSERT(reporter, s1.back() == 100);
216 REPORTER_ASSERT(reporter, s[3] == 4);
217 REPORTER_ASSERT(reporter, t[3] == 4);
219 REPORTER_ASSERT(reporter, s[3] == 100);
225 REPORTER_ASSERT(reporter, s.empty());
229 DEF_TEST(SkEnumerate, reporter) {
236 REPORTER_ASSERT(reporter, i == check);
237 REPORTER_ASSERT(reporter, v == (int)check+1);
244 REPORTER_ASSERT(reporter, i == check);
245 REPORTER_ASSERT(reporter, v == (int)check+1);
253 REPORTER_ASSERT(reporter, i == check);
254 REPORTER_ASSERT(reporter, v == (int)check+1);
257 REPORTER_ASSERT(reporter, check == 4);
261 REPORTER_ASSERT(reporter, i == check);
262 REPORTER_ASSERT(reporter, v == (int)check+1);
269 REPORTER_ASSERT(reporter, v == (int) i + 1);
271 REPORTER_ASSERT(reporter, e.size() == 2);
277 REPORTER_ASSERT(reporter, v == (int) i + 1);
279 REPORTER_ASSERT(reporter, e.size() == 2);
285 REPORTER_ASSERT(reporter, v == (int) i + 1);
287 REPORTER_ASSERT(reporter, e.size() == 2);
306 REPORTER_ASSERT(reporter, s[i].i == (int)i);
307 REPORTER_ASSERT(reporter, is[i].i == (int)i);
324 REPORTER_ASSERT(reporter, *os[i] == (int)i);
325 REPORTER_ASSERT(reporter, is[i] == nullptr);
342 REPORTER_ASSERT(reporter, *os[i] == (int)i);
343 REPORTER_ASSERT(reporter, is[i] == nullptr);
348 DEF_TEST(SkZip, reporter) {
359 REPORTER_ASSERT(reporter, z.size() == 4);
360 REPORTER_ASSERT(reporter, !z.empty());
365 REPORTER_ASSERT(reporter, std::get<0>(t) == 1);
366 REPORTER_ASSERT(reporter, std::get<1>(t) == 10.f);
367 REPORTER_ASSERT(reporter, std::get<2>(t) == 20);
368 REPORTER_ASSERT(reporter, std::get<3>(t) == 100);
369 REPORTER_ASSERT(reporter, std::get<4>(t) == 20);
375 REPORTER_ASSERT(reporter, std::get<0>(t) == 4);
376 REPORTER_ASSERT(reporter, std::get<1>(t) == 40.f);
383 REPORTER_ASSERT(reporter, a == A[i]);
384 REPORTER_ASSERT(reporter, b == B[i]);
385 REPORTER_ASSERT(reporter, c == C[i]);
386 REPORTER_ASSERT(reporter, d == D[i]);
387 REPORTER_ASSERT(reporter, s == S[i]);
391 REPORTER_ASSERT(reporter, i = 4);
398 REPORTER_ASSERT(reporter, a == A[i]);
399 REPORTER_ASSERT(reporter, b == B[i]);
400 REPORTER_ASSERT(reporter, c == C[i]);
401 REPORTER_ASSERT(reporter, d == D[i]);
402 REPORTER_ASSERT(reporter, s == S[i]);
406 REPORTER_ASSERT(reporter, i = 2);
415 REPORTER_ASSERT(reporter, a == A[i + 2]);
416 REPORTER_ASSERT(reporter, b == B[i + 2]);
417 REPORTER_ASSERT(reporter, c == C[i + 2]);
418 REPORTER_ASSERT(reporter, d == D[i + 2]);
419 REPORTER_ASSERT(reporter, s == S[i + 2]);
423 REPORTER_ASSERT(reporter, i = 2);
432 REPORTER_ASSERT(reporter, a == A[i + 1]);
433 REPORTER_ASSERT(reporter, b == B[i + 1]);
434 REPORTER_ASSERT(reporter, c == C[i + 1]);
435 REPORTER_ASSERT(reporter, d == D[i + 1]);
436 REPORTER_ASSERT(reporter, s == S[i + 1]);
440 REPORTER_ASSERT(reporter, i = 2);
448 REPORTER_ASSERT(reporter, a == A[i]);
449 REPORTER_ASSERT(reporter, b == B[i]);
450 REPORTER_ASSERT(reporter, c == C[i]);
451 REPORTER_ASSERT(reporter, d == D[i]);
452 REPORTER_ASSERT(reporter, s == S[i]);
456 REPORTER_ASSERT(reporter, i = 4);
464 REPORTER_ASSERT(reporter, a == A[i]);
465 REPORTER_ASSERT(reporter, b == B[i]);
466 REPORTER_ASSERT(reporter, c == C[i]);
467 REPORTER_ASSERT(reporter, d == D[i]);
468 REPORTER_ASSERT(reporter, s == S[i]);
472 REPORTER_ASSERT(reporter, i = 4);
478 REPORTER_ASSERT(reporter,
485 REPORTER_ASSERT(reporter, span[1] == 20.f);
492 REPORTER_ASSERT(reporter, a == 2);
493 REPORTER_ASSERT(reporter, b == 20.f);
494 REPORTER_ASSERT(reporter, c == 30);
495 REPORTER_ASSERT(reporter, d == 200);
496 REPORTER_ASSERT(reporter, e == 30);
499 REPORTER_ASSERT(reporter, &a == &A[1]);
500 REPORTER_ASSERT(reporter, &b == &B[1]);
501 REPORTER_ASSERT(reporter, &c == &C[1]);
502 REPORTER_ASSERT(reporter, &d == &D[1]);
503 REPORTER_ASSERT(reporter, &e == &S[1]);
513 REPORTER_ASSERT(reporter, std::get<0>(t1) == 20);
514 REPORTER_ASSERT(reporter, std::get<1>(t1) == 20.f);
515 REPORTER_ASSERT(reporter, std::get<2>(t1) == 300);
516 REPORTER_ASSERT(reporter, std::get<3>(t1) == 2000);
517 REPORTER_ASSERT(reporter, std::get<4>(t1) == 300);
521 DEF_TEST(SkMakeZip, reporter) {
534 REPORTER_ASSERT(reporter, a == A[i]);
535 REPORTER_ASSERT(reporter, b == B[i]);
536 REPORTER_ASSERT(reporter, c == C[i]);
537 REPORTER_ASSERT(reporter, d == D[i]);
538 REPORTER_ASSERT(reporter, s == S[i]);
539 REPORTER_ASSERT(reporter, p == P[i]);
543 REPORTER_ASSERT(reporter, i = 4);
550 REPORTER_ASSERT(reporter, a == A[i]);
551 REPORTER_ASSERT(reporter, b == B[i]);
552 REPORTER_ASSERT(reporter, c == C[i]);
553 REPORTER_ASSERT(reporter, d == D[i]);
554 REPORTER_ASSERT(reporter, s == S[i]);
558 REPORTER_ASSERT(reporter, i = 4);
565 REPORTER_ASSERT(reporter, a == A[i]);
566 REPORTER_ASSERT(reporter, b == B[i]);
567 REPORTER_ASSERT(reporter, c == C[i]);
568 REPORTER_ASSERT(reporter, d == D[i]);
569 REPORTER_ASSERT(reporter, s == S[i]);
573 REPORTER_ASSERT(reporter, i = 4);
580 REPORTER_ASSERT(reporter, a == A[i]);
581 REPORTER_ASSERT(reporter, b == B[i]);
582 REPORTER_ASSERT(reporter, c == C[i]);
583 REPORTER_ASSERT(reporter, d == D[i]);
584 REPORTER_ASSERT(reporter, s == S[i]);
588 REPORTER_ASSERT(reporter, i = 4);
595 REPORTER_ASSERT(reporter, a == A[i]);
596 REPORTER_ASSERT(reporter, b == B[i]);
597 REPORTER_ASSERT(reporter, c == C[i]);
598 REPORTER_ASSERT(reporter, d == D[i]);
599 REPORTER_ASSERT(reporter, s == S[i]);
603 REPORTER_ASSERT(reporter, i = 4);
610 REPORTER_ASSERT(reporter, a == A[i]);
611 REPORTER_ASSERT(reporter, b == B[i]);
612 REPORTER_ASSERT(reporter, c == C[i]);
613 REPORTER_ASSERT(reporter, d == D[i]);
614 REPORTER_ASSERT(reporter, s == S[i]);
622 REPORTER_ASSERT(reporter, a == A[i]);
623 REPORTER_ASSERT(reporter, b == B[i]);
624 REPORTER_ASSERT(reporter, c == C[i]);
625 REPORTER_ASSERT(reporter, d == D[i]);
626 REPORTER_ASSERT(reporter, s == S[i]);
633 REPORTER_ASSERT(reporter, a == A[i]);
634 REPORTER_ASSERT(reporter, b == B[i]);
635 REPORTER_ASSERT(reporter, c == C[i]);
636 REPORTER_ASSERT(reporter, d == D[i]);
637 REPORTER_ASSERT(reporter, s == S[i]);
644 REPORTER_ASSERT(reporter, z.empty());
653 REPORTER_ASSERT(reporter, !z.empty());