Lines Matching defs:reporter

147 void check_save_state(skiatest::Reporter* reporter, SkPicture* picture,
157 REPORTER_ASSERT(reporter, numSaves >= canvas.getSaveCount());
158 REPORTER_ASSERT(reporter, numSaveLayers >= canvas.getSaveLayerCount());
159 REPORTER_ASSERT(reporter, numRestores >= canvas.getRestoreCount());
191 static void check_balance(skiatest::Reporter* reporter, SkPicture* picture) {
204 REPORTER_ASSERT(reporter, beforeSaveCount == canvas.getSaveCount());
205 REPORTER_ASSERT(reporter, beforeMatrix == canvas.getTotalMatrix());
209 REPORTER_ASSERT(reporter, afterClip == beforeClip);
213 DEF_TEST(PictureRecorder_replay, reporter) {
225 check_save_state(reporter, copy.get(), 2, 1, 3);
231 check_save_state(reporter, final.get(), 1, 2, 3);
234 check_save_state(reporter, copy.get(), 2, 1, 3);
247 check_balance(reporter, copy.get());
249 REPORTER_ASSERT(reporter, expectedSaveCount = canvas->getSaveCount());
257 static void test_unbalanced_save_restores(skiatest::Reporter* reporter) {
261 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
280 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
301 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
313 REPORTER_ASSERT(reporter, 4 == testCanvas.getSaveCount());
314 REPORTER_ASSERT(reporter, testCanvas.getTotalMatrix().isIdentity());
351 static void test_bad_bitmap(skiatest::Reporter* reporter) {
356 REPORTER_ASSERT(reporter, !img);
368 static void test_clip_bound_opt(skiatest::Reporter* reporter) {
392 REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
393 REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
394 REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
395 REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
402 REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
403 REPORTER_ASSERT(reporter, 7 == clipBounds.fTop);
404 REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
405 REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
411 REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
412 REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
413 REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
414 REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
421 REPORTER_ASSERT(reporter, 7 == clipBounds.fLeft);
422 REPORTER_ASSERT(reporter, 7 == clipBounds.fTop);
423 REPORTER_ASSERT(reporter, 8 == clipBounds.fBottom);
424 REPORTER_ASSERT(reporter, 8 == clipBounds.fRight);
428 static void test_cull_rect_reset(skiatest::Reporter* reporter) {
439 REPORTER_ASSERT(reporter, picture);
442 REPORTER_ASSERT(reporter, 0 == finalCullRect.fLeft);
443 REPORTER_ASSERT(reporter, 0 == finalCullRect.fTop);
444 REPORTER_ASSERT(reporter, 100 == finalCullRect.fBottom);
445 REPORTER_ASSERT(reporter, 100 == finalCullRect.fRight);
487 static void test_gen_id(skiatest::Reporter* reporter) {
494 REPORTER_ASSERT(reporter, empty->uniqueID() != SK_InvalidGenID);
500 REPORTER_ASSERT(reporter, hasData->uniqueID() != SK_InvalidGenID);
503 REPORTER_ASSERT(reporter, hasData->uniqueID() != empty->uniqueID());
506 static void test_typeface(skiatest::Reporter* reporter) {
516 DEF_TEST(Picture, reporter) {
517 test_typeface(reporter);
522 test_bad_bitmap(reporter);
523 test_unbalanced_save_restores(reporter);
525 test_clip_bound_opt(reporter);
526 test_gen_id(reporter);
527 test_cull_rect_reset(reporter);
562 DEF_TEST(DontOptimizeSaveLayerDrawDrawRestore, reporter) {
605 REPORTER_ASSERT(reporter, replayBM.getColor(30, 30) == 0xff000080);
606 REPORTER_ASSERT(reporter, replayBM.getColor(55, 55) == 0xff800000);
813 DEF_TEST(Picture_empty_serial, reporter) {
817 REPORTER_ASSERT(reporter, pic);
820 REPORTER_ASSERT(reporter, data);
823 REPORTER_ASSERT(reporter, pic2);