From ccec0f958ffc71a9986d236bc2eb335cb2111119 Mon Sep 17 00:00:00 2001 From: caryclark Date: Tue, 24 Mar 2015 07:28:17 -0700 Subject: pathops version two R=reed@google.com marked 'no commit' to attempt to get trybots to run TBR=reed@google.com Review URL: https://codereview.chromium.org/1002693002 --- tests/PathOpsBuilderTest.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/PathOpsBuilderTest.cpp') diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp index 1eadebc550..5fdeb3e2b9 100644 --- a/tests/PathOpsBuilderTest.cpp +++ b/tests/PathOpsBuilderTest.cpp @@ -4,7 +4,10 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + +#include "PathOpsExtendedTest.h" #include "PathOpsTestCommon.h" +#include "SkBitmap.h" #include "Test.h" DEF_TEST(PathOpsBuilder, reporter) { @@ -22,6 +25,7 @@ DEF_TEST(PathOpsBuilder, reporter) { REPORTER_ASSERT(reporter, result.isEmpty()); SkPath rectPath; + rectPath.setFillType(SkPath::kEvenOdd_FillType); rectPath.addRect(0, 1, 2, 3, SkPath::kCW_Direction); builder.add(rectPath, kUnion_PathOp); REPORTER_ASSERT(reporter, builder.resolve(&result)); @@ -33,13 +37,14 @@ DEF_TEST(PathOpsBuilder, reporter) { REPORTER_ASSERT(reporter, rectPath == result); rectPath.reset(); + rectPath.setFillType(SkPath::kEvenOdd_FillType); rectPath.addRect(0, 1, 2, 3, SkPath::kCCW_Direction); builder.add(rectPath, kUnion_PathOp); REPORTER_ASSERT(reporter, builder.resolve(&result)); REPORTER_ASSERT(reporter, result.isRect(NULL, &closed, &dir)); REPORTER_ASSERT(reporter, closed); REPORTER_ASSERT(reporter, dir == SkPath::kCCW_Direction); - REPORTER_ASSERT(reporter, rectPath == result); + REPORTER_ASSERT(reporter, rectPath == result); builder.add(rectPath, kDifference_PathOp); REPORTER_ASSERT(reporter, builder.resolve(&result)); @@ -69,5 +74,7 @@ DEF_TEST(PathOpsBuilder, reporter) { builder.add(circle2, kUnion_PathOp); builder.add(circle3, kDifference_PathOp); REPORTER_ASSERT(reporter, builder.resolve(&result)); - REPORTER_ASSERT(reporter, opCompare == result); + SkBitmap bitmap; + int pixelDiff = comparePaths(reporter, __FUNCTION__, opCompare, result, bitmap); + REPORTER_ASSERT(reporter, pixelDiff == 0); } -- cgit v1.2.3