Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

22  *                                         skiatest::Reporter* reporter,
27 * REPORTER_ASSERT_MESSAGE(reporter, (...), \
71 DEF_TEST(canvas_clipbounds, reporter) {
77 REPORTER_ASSERT(reporter, irect == SkIRect::MakeWH(10, 10));
78 REPORTER_ASSERT(reporter, canvas.getDeviceClipBounds(&irect2));
79 REPORTER_ASSERT(reporter, irect == irect2);
83 REPORTER_ASSERT(reporter, rect.contains(SkRect::MakeWH(10, 10)));
84 REPORTER_ASSERT(reporter, canvas.getLocalClipBounds(&rect2));
85 REPORTER_ASSERT(reporter, rect == rect2);
90 REPORTER_ASSERT(reporter, irect == SkIRect::MakeEmpty());
91 REPORTER_ASSERT(reporter, !canvas.getDeviceClipBounds(&irect2));
92 REPORTER_ASSERT(reporter, irect == irect2);
95 REPORTER_ASSERT(reporter, rect == SkRect::MakeEmpty());
96 REPORTER_ASSERT(reporter, !canvas.getLocalClipBounds(&rect2));
97 REPORTER_ASSERT(reporter, rect == rect2);
102 REPORTER_ASSERT(reporter, c.getBaseLayerSize() == SkISize::MakeEmpty());
122 static void test_restriction(skiatest::Reporter* reporter, SkCanvas* canvas) {
123 REPORTER_ASSERT(reporter, canvas->getDeviceClipBounds() == gBaseRestrictedR);
127 REPORTER_ASSERT(reporter, canvas->getDeviceClipBounds() == restrictionR);
131 REPORTER_ASSERT(reporter, canvas->getDeviceClipBounds() == clipR);
148 REPORTER_ASSERT(reporter, gBaseRestrictedR.contains(canvas->getDeviceClipBounds()));
162 DEF_TEST(canvas_clip_restriction, reporter) {
164 [reporter](SkCanvas* canvas) { test_restriction(reporter, canvas); });
167 DEF_TEST(canvas_empty_clip, reporter) {
168 multi_canvas_driver(50, 50, [reporter](SkCanvas* canvas) {
171 REPORTER_ASSERT(reporter, !canvas->isClipEmpty());
173 REPORTER_ASSERT(reporter, canvas->isClipEmpty());
306 virtual void draw(SkCanvas*, const TestData&, skiatest::Reporter*) = 0;
333 skiatest::Reporter* reporter) { \
334 FUNCTION (canvas, d, reporter, this); \
345 skiatest::Reporter* reporter) { \
346 FUNCTION (canvas, d, reporter, this); \
354 skiatest::Reporter*, CanvasTestStep*) { \
361 skiatest::Reporter*, CanvasTestStep* testStep) { \
362 REPORTER_ASSERT_MESSAGE(reporter, canvas-> CALL , \
387 skiatest::Reporter* reporter, CanvasTestStep* testStep) {
393 REPORTER_ASSERT_MESSAGE(reporter, canvas->getSaveCount() == saveCount,
395 REPORTER_ASSERT_MESSAGE(reporter, canvas->getTotalMatrix().isIdentity(),
397 // REPORTER_ASSERT_MESSAGE(reporter, canvas->getTotalClip() != kTestRegion, testStep->assertMessage());
402 skiatest::Reporter* reporter, CanvasTestStep* testStep) {
406 REPORTER_ASSERT_MESSAGE(reporter, canvas->getSaveCount() == saveCount,
412 skiatest::Reporter* reporter, CanvasTestStep* testStep) {
416 REPORTER_ASSERT_MESSAGE(reporter, canvas->getSaveCount() == saveCount,
422 skiatest::Reporter* reporter, CanvasTestStep* testStep) {
426 REPORTER_ASSERT_MESSAGE(reporter, canvas->getSaveCount() == saveCount,
432 skiatest::Reporter*, CanvasTestStep*) {
445 skiatest::Reporter*, CanvasTestStep*) {
455 skiatest::Reporter*, CanvasTestStep*) {
472 skiatest::Reporter*, CanvasTestStep*) {
485 skiatest::Reporter* reporter, CanvasTestStep* testStep) {
488 REPORTER_ASSERT_MESSAGE(reporter, baseSaveCount == n, testStep->assertMessage());
489 REPORTER_ASSERT_MESSAGE(reporter, baseSaveCount + 1 == canvas->getSaveCount(),
493 REPORTER_ASSERT_MESSAGE(reporter, baseSaveCount + 3 == canvas->getSaveCount(),
496 REPORTER_ASSERT_MESSAGE(reporter, baseSaveCount + 1 == canvas->getSaveCount(),
501 REPORTER_ASSERT_MESSAGE(reporter, 1 == canvas->getSaveCount(),
507 skiatest::Reporter*, CanvasTestStep*) {
528 skiatest::Reporter*, CanvasTestStep*) {
546 static void TestPdfDevice(skiatest::Reporter* reporter, const TestData& d, CanvasTestStep* step) {
549 REPORTER_ASSERT(reporter, doc);
555 REPORTER_ASSERT(reporter, canvas);
557 step->draw(canvas, d, reporter);
566 static void TestOverrideStateConsistency(skiatest::Reporter* reporter, const TestData& d,
572 testStep->draw(&referenceCanvas, d, reporter);
575 static void test_newraster(skiatest::Reporter* reporter) {
584 REPORTER_ASSERT(reporter, canvas);
588 REPORTER_ASSERT(reporter, addr);
589 REPORTER_ASSERT(reporter, info == pmap.info());
590 REPORTER_ASSERT(reporter, minRowBytes == pmap.rowBytes());
593 REPORTER_ASSERT(reporter, 0 == addr[x]);
600 REPORTER_ASSERT(reporter, nullptr == SkCanvas::MakeRasterDirect(info, baseAddr, minRowBytes));
604 REPORTER_ASSERT(reporter, nullptr == SkCanvas::MakeRasterDirect(info, baseAddr, minRowBytes));
608 REPORTER_ASSERT(reporter, nullptr == SkCanvas::MakeRasterDirect(info, baseAddr, minRowBytes));
613 REPORTER_ASSERT(reporter, canvas);
616 DEF_TEST(Canvas, reporter) {
620 TestOverrideStateConsistency(reporter, d, testStepArray()[testStep]);
622 TestPdfDevice(reporter, d, testStepArray()[testStep]);
626 test_newraster(reporter);
629 DEF_TEST(Canvas_SaveState, reporter) {
631 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount());
634 REPORTER_ASSERT(reporter, 1 == n);
635 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount());
638 REPORTER_ASSERT(reporter, 2 == n);
639 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount());
642 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount());
644 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount());
647 DEF_TEST(Canvas_ClipEmptyPath, reporter) {
679 DEF_TEST(PaintFilterCanvas_ConsistentState, reporter) {
685 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMatrix());
686 REPORTER_ASSERT(reporter, canvas.getLocalClipBounds() == filterCanvas.getLocalClipBounds());
690 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMatrix());
691 REPORTER_ASSERT(reporter, filterCanvas.getLocalClipBounds().contains(canvas.getLocalClipBounds()));
763 static void test_cliptype(SkCanvas* canvas, skiatest::Reporter* r) {