Lines Matching refs:reporter

13 static void TestTSet_basic(skiatest::Reporter* reporter) {
15 REPORTER_ASSERT(reporter, set0.isEmpty());
16 REPORTER_ASSERT(reporter, !set0.contains(-1));
17 REPORTER_ASSERT(reporter, !set0.contains(0));
18 REPORTER_ASSERT(reporter, !set0.contains(1));
19 REPORTER_ASSERT(reporter, set0.count() == 0);
21 REPORTER_ASSERT(reporter, set0.add(0));
22 REPORTER_ASSERT(reporter, !set0.isEmpty());
23 REPORTER_ASSERT(reporter, !set0.contains(-1));
24 REPORTER_ASSERT(reporter, set0.contains(0));
25 REPORTER_ASSERT(reporter, !set0.contains(1));
26 REPORTER_ASSERT(reporter, set0.count() == 1);
27 REPORTER_ASSERT(reporter, !set0.add(0));
28 REPORTER_ASSERT(reporter, set0.count() == 1);
45 static void TestTSet_advanced(skiatest::Reporter* reporter) {
49 REPORTER_ASSERT(reporter, !set0.contains(f(i)));
51 REPORTER_ASSERT(reporter, set0.contains(f(0)));
52 REPORTER_ASSERT(reporter, set0.contains(f(i / 2)));
53 REPORTER_ASSERT(reporter, set0.contains(f(i - 1)));
55 REPORTER_ASSERT(reporter, !set0.contains(f(i)));
56 REPORTER_ASSERT(reporter, set0.count() == i);
57 REPORTER_ASSERT(reporter, set0.add(f(i)));
58 REPORTER_ASSERT(reporter, set0.contains(f(i)));
59 REPORTER_ASSERT(reporter, set0.count() == i + 1);
60 REPORTER_ASSERT(reporter, !set0.add(f(i)));
65 REPORTER_ASSERT(reporter, set0[i] == f(i));
71 REPORTER_ASSERT(reporter, set0.count() == set1.count());
72 REPORTER_ASSERT(reporter, !set1.contains(-1000));
75 REPORTER_ASSERT(reporter, set1.contains(f(i)));
76 REPORTER_ASSERT(reporter, set1[i] == f(i));
83 REPORTER_ASSERT(reporter, set0.count() == set2.count());
84 REPORTER_ASSERT(reporter, !set2.contains(-1000));
87 REPORTER_ASSERT(reporter, set2.contains(f(i)));
88 REPORTER_ASSERT(reporter, set2[i] == f(i));
98 static void TestTSet_merge(skiatest::Reporter* reporter) {
103 REPORTER_ASSERT(reporter, set.add(2 * i));
104 REPORTER_ASSERT(reporter, setOdd.add(2 * i + 1));
107 REPORTER_ASSERT(reporter, set.mergeInto(setOdd) == 0);
108 REPORTER_ASSERT(reporter, set.count() == 2 * COUNT);
111 REPORTER_ASSERT(reporter, set.mergeInto(setOdd) == setOdd.count());
112 REPORTER_ASSERT(reporter, set.count() == 2 * COUNT);
115 REPORTER_ASSERT(reporter, set.contains(i));
120 REPORTER_ASSERT(reporter, set[i] == 2 * i);
121 REPORTER_ASSERT(reporter, set[COUNT + i] == 2 * i + 1);
130 static void TestTSet(skiatest::Reporter* reporter) {
131 TestTSet_basic(reporter);
132 TestTSet_advanced(reporter);
133 TestTSet_merge(reporter);