Home | History | Annotate | Download | only in tests

Lines Matching refs:reporter

14 static void TestTSet_basic(skiatest::Reporter* reporter) {
16 REPORTER_ASSERT(reporter, set0.isEmpty());
17 REPORTER_ASSERT(reporter, !set0.contains(-1));
18 REPORTER_ASSERT(reporter, !set0.contains(0));
19 REPORTER_ASSERT(reporter, !set0.contains(1));
20 REPORTER_ASSERT(reporter, set0.count() == 0);
22 REPORTER_ASSERT(reporter, set0.add(0));
23 REPORTER_ASSERT(reporter, !set0.isEmpty());
24 REPORTER_ASSERT(reporter, !set0.contains(-1));
25 REPORTER_ASSERT(reporter, set0.contains(0));
26 REPORTER_ASSERT(reporter, !set0.contains(1));
27 REPORTER_ASSERT(reporter, set0.count() == 1);
28 REPORTER_ASSERT(reporter, !set0.add(0));
29 REPORTER_ASSERT(reporter, set0.count() == 1);
46 static void TestTSet_advanced(skiatest::Reporter* reporter) {
50 REPORTER_ASSERT(reporter, !set0.contains(f(i)));
52 REPORTER_ASSERT(reporter, set0.contains(f(0)));
53 REPORTER_ASSERT(reporter, set0.contains(f(i / 2)));
54 REPORTER_ASSERT(reporter, set0.contains(f(i - 1)));
56 REPORTER_ASSERT(reporter, !set0.contains(f(i)));
57 REPORTER_ASSERT(reporter, set0.count() == i);
58 REPORTER_ASSERT(reporter, set0.add(f(i)));
59 REPORTER_ASSERT(reporter, set0.contains(f(i)));
60 REPORTER_ASSERT(reporter, set0.count() == i + 1);
61 REPORTER_ASSERT(reporter, !set0.add(f(i)));
66 REPORTER_ASSERT(reporter, set0[i] == f(i));
72 REPORTER_ASSERT(reporter, set0.count() == set1.count());
73 REPORTER_ASSERT(reporter, !set1.contains(-1000));
76 REPORTER_ASSERT(reporter, set1.contains(f(i)));
77 REPORTER_ASSERT(reporter, set1[i] == f(i));
84 REPORTER_ASSERT(reporter, set0.count() == set2.count());
85 REPORTER_ASSERT(reporter, !set2.contains(-1000));
88 REPORTER_ASSERT(reporter, set2.contains(f(i)));
89 REPORTER_ASSERT(reporter, set2[i] == f(i));
99 static void TestTSet_merge(skiatest::Reporter* reporter) {
104 REPORTER_ASSERT(reporter, set.add(2 * i));
105 REPORTER_ASSERT(reporter, setOdd.add(2 * i + 1));
108 REPORTER_ASSERT(reporter, set.mergeInto(setOdd) == 0);
109 REPORTER_ASSERT(reporter, set.count() == 2 * COUNT);
112 REPORTER_ASSERT(reporter, set.mergeInto(setOdd) == setOdd.count());
113 REPORTER_ASSERT(reporter, set.count() == 2 * COUNT);
116 REPORTER_ASSERT(reporter, set.contains(i));
121 REPORTER_ASSERT(reporter, set[i] == 2 * i);
122 REPORTER_ASSERT(reporter, set[COUNT + i] == 2 * i + 1);
131 DEF_TEST(TSet, reporter) {
132 TestTSet_basic(reporter);
133 TestTSet_advanced(reporter);
134 TestTSet_merge(reporter);