Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

18 #define TEST_NO_INTERSECT(rgn, rect)    REPORTER_ASSERT(reporter, !rgn.intersects(rect))
19 #define TEST_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, rgn.intersects(rect))
20 #define TEST_NO_CONTAINS(rgn, rect) REPORTER_ASSERT(reporter, !rgn.contains(rect))
24 static void test_fromchrome(skiatest::Reporter* reporter) {
81 static void test_empties(skiatest::Reporter* reporter) {
85 REPORTER_ASSERT(reporter, empty.isEmpty());
86 REPORTER_ASSERT(reporter, !valid.isEmpty());
89 REPORTER_ASSERT(reporter, !empty.intersects(empty2));
90 REPORTER_ASSERT(reporter, !valid.intersects(empty));
93 REPORTER_ASSERT(reporter, !empty.contains(empty2));
94 REPORTER_ASSERT(reporter, !valid.contains(empty));
95 REPORTER_ASSERT(reporter, !empty.contains(valid));
142 static void test_contains_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
146 REPORTER_ASSERT(reporter, rgn.contains(r));
148 REPORTER_ASSERT(reporter, !rgn.contains(r));
153 static void contains_proc(skiatest::Reporter* reporter,
158 REPORTER_ASSERT(reporter, c0 == c1);
165 REPORTER_ASSERT(reporter, c0 == c1);
167 test_contains_iter(reporter, a);
168 test_contains_iter(reporter, b);
171 static void test_intersects_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
175 REPORTER_ASSERT(reporter, rgn.intersects(r));
177 REPORTER_ASSERT(reporter, rgn.intersects(r));
182 static void intersects_proc(skiatest::Reporter* reporter,
186 REPORTER_ASSERT(reporter, c0 == c1);
188 test_intersects_iter(reporter, a);
189 test_intersects_iter(reporter, b);
192 static void test_proc(skiatest::Reporter* reporter,
193 void (*proc)(skiatest::Reporter*,
201 proc(reporter, outer, inner);
234 DEF_TEST(Region, reporter) {
239 REPORTER_ASSERT(reporter, test_rects(r2, SK_ARRAY_COUNT(r2)));
247 REPORTER_ASSERT(reporter, test_rects(rects, SK_ARRAY_COUNT(rects)));
258 REPORTER_ASSERT(reporter, test_rects(rect, N));
261 test_proc(reporter, contains_proc);
262 test_proc(reporter, intersects_proc);
263 test_empties(reporter);
264 test_fromchrome(reporter);
269 static void test_write(const SkRegion& region, skiatest::Reporter* r) {