Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

16 #define TEST_NO_INTERSECT(rgn, rect)    REPORTER_ASSERT(reporter, !rgn.intersects(rect))
17 #define TEST_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, rgn.intersects(rect))
18 #define TEST_NO_CONTAINS(rgn, rect) REPORTER_ASSERT(reporter, !rgn.contains(rect))
22 static void test_fromchrome(skiatest::Reporter* reporter) {
79 static void test_empties(skiatest::Reporter* reporter) {
83 REPORTER_ASSERT(reporter, empty.isEmpty());
84 REPORTER_ASSERT(reporter, !valid.isEmpty());
87 REPORTER_ASSERT(reporter, !empty.intersects(empty2));
88 REPORTER_ASSERT(reporter, !valid.intersects(empty));
91 REPORTER_ASSERT(reporter, !empty.contains(empty2));
92 REPORTER_ASSERT(reporter, !valid.contains(empty));
93 REPORTER_ASSERT(reporter, !empty.contains(valid));
133 static void test_contains_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
137 REPORTER_ASSERT(reporter, rgn.contains(r));
139 REPORTER_ASSERT(reporter, !rgn.contains(r));
144 static void contains_proc(skiatest::Reporter* reporter,
149 REPORTER_ASSERT(reporter, c0 == c1);
156 REPORTER_ASSERT(reporter, c0 == c1);
158 test_contains_iter(reporter, a);
159 test_contains_iter(reporter, b);
162 static void test_intersects_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
166 REPORTER_ASSERT(reporter, rgn.intersects(r));
168 REPORTER_ASSERT(reporter, rgn.intersects(r));
173 static void intersects_proc(skiatest::Reporter* reporter,
177 REPORTER_ASSERT(reporter, c0 == c1);
179 test_intersects_iter(reporter, a);
180 test_intersects_iter(reporter, b);
183 static void test_proc(skiatest::Reporter* reporter,
184 void (*proc)(skiatest::Reporter*,
192 proc(reporter, outer, inner);
225 DEF_TEST(Region, reporter) {
230 REPORTER_ASSERT(reporter, test_rects(r2, SK_ARRAY_COUNT(r2)));
238 REPORTER_ASSERT(reporter, test_rects(rects, SK_ARRAY_COUNT(rects)));
249 REPORTER_ASSERT(reporter, test_rects(rect, N));
252 test_proc(reporter, contains_proc);
253 test_proc(reporter, intersects_proc);
254 test_empties(reporter);
255 test_fromchrome(reporter);