Lines Matching refs:Reporter
39 static void verifyTileHits(skiatest::Reporter* reporter, SkIRect rect, uint32_t tileMask,
47 REPORTER_ASSERT(reporter, grid.tile(0,0).count() ==
49 REPORTER_ASSERT(reporter, grid.tile(1,0).count() ==
51 REPORTER_ASSERT(reporter, grid.tile(0,1).count() ==
53 REPORTER_ASSERT(reporter, grid.tile(1,1).count() ==
57 static void TestUnalignedQuery(skiatest::Reporter* reporter) {
83 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
84 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
91 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
92 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
100 REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
101 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
102 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]);
110 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
111 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
119 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
120 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
127 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
128 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
135 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
136 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
143 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
144 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
148 static void TestOverlapOffsetQueryAlignment(skiatest::Reporter* reporter) {
188 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
189 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
196 REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
197 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
198 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]);
208 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count());
209 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
216 REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
217 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]);
218 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]);
225 REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count());
226 REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]);
227 REPORTER_ASSERT(reporter, rect3 == mockCanvas.fRects[1]);
245 static void Test(skiatest::Reporter* reporter) {
247 verifyTileHits(reporter, SkIRect::MakeXYWH(30, 0, 1, 1), 0);
248 verifyTileHits(reporter, SkIRect::MakeXYWH(0, 30, 1, 1), 0);
249 verifyTileHits(reporter, SkIRect::MakeXYWH(-10, 0, 1, 1), 0);
250 verifyTileHits(reporter, SkIRect::MakeXYWH(0, -10, 1, 1), 0);
253 verifyTileHits(reporter, SkIRect::MakeXYWH(0, 0, 9, 9), kTopLeft_Tile);
254 verifyTileHits(reporter, SkIRect::MakeXYWH(0, 0, 10, 10), kAll_Tile);
255 verifyTileHits(reporter, SkIRect::MakeXYWH(9, 9, 1, 1), kAll_Tile);
256 verifyTileHits(reporter, SkIRect::MakeXYWH(10, 10, 1, 1), kAll_Tile);
257 verifyTileHits(reporter, SkIRect::MakeXYWH(11, 11, 1, 1), kBottomRight_Tile);
260 verifyTileHits(reporter, SkIRect::MakeXYWH(0, 0, 6, 6), kTopLeft_Tile, 1);
261 verifyTileHits(reporter, SkIRect::MakeXYWH(0, 0, 7, 7), kAll_Tile, 1);
262 verifyTileHits(reporter, SkIRect::MakeXYWH(9, 9, 1, 1), kAll_Tile, 1);
263 verifyTileHits(reporter, SkIRect::MakeXYWH(10, 10, 1, 1), kBottomRight_Tile, 1);
264 verifyTileHits(reporter, SkIRect::MakeXYWH(17, 17, 1, 1), kBottomRight_Tile, 1);
267 verifyTileHits(reporter, SkIRect::MakeXYWH(5, 5, 10, 1), kTopLeft_Tile | kTopRight_Tile);
268 verifyTileHits(reporter, SkIRect::MakeXYWH(5, 5, 1, 10), kTopLeft_Tile |
270 verifyTileHits(reporter, SkIRect::MakeXYWH(5, 5, 10, 10), kAll_Tile);
271 verifyTileHits(reporter, SkIRect::MakeXYWH(-10, -10, 40, 40), kAll_Tile);
273 TestUnalignedQuery(reporter);
274 TestOverlapOffsetQueryAlignment(reporter);