Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: tests/PathOpsThreeWayTest.cpp

Issue 2426173002: fix fuzzers (Closed)
Patch Set: fix dm Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | tests/StrokerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsThreeWayTest.cpp
diff --git a/tests/PathOpsThreeWayTest.cpp b/tests/PathOpsThreeWayTest.cpp
index 6a93bfbc5945b15ea1b5ed32c59996e17eca115f..b86ff65c8be19c94d22a676323cdd624a4ad0552 100644
--- a/tests/PathOpsThreeWayTest.cpp
+++ b/tests/PathOpsThreeWayTest.cpp
@@ -4,6 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "PathOpsTestCommon.h"
#include "SkIntersections.h"
#include "SkTDArray.h"
#include "Test.h"
@@ -12,7 +13,7 @@
struct Curve {
int ptCount;
- SkDCubic curve; // largest can hold lines / quads/ cubics
+ CubicPts curve; // largest can hold lines / quads/ cubics
};
static const Curve testSet0[] = { // extracted from skpClip2
@@ -49,16 +50,19 @@ static void testSetTest(skiatest::Reporter* reporter, int index) {
const Curve& iTest = testSet.tests[inner];
SkIntersections* i = combos.append();
sk_bzero(i, sizeof(SkIntersections));
- SkDLine oLine = {{ oTest.curve[0], oTest.curve[1] }};
- SkDLine iLine = {{ iTest.curve[0], iTest.curve[1] }};
+ SkDLine oLine = {{ oTest.curve.fPts[0], oTest.curve.fPts[1] }};
+ SkDLine iLine = {{ iTest.curve.fPts[0], iTest.curve.fPts[1] }};
+ SkDCubic iCurve, oCurve;
+ iCurve.debugSet(iTest.curve.fPts);
+ oCurve.debugSet(oTest.curve.fPts);
if (oTest.ptCount == 1 && iTest.ptCount == 1) {
i->intersect(oLine, iLine);
} else if (oTest.ptCount == 1 && iTest.ptCount == 4) {
- i->intersect(iTest.curve, oLine);
+ i->intersect(iCurve, oLine);
} else if (oTest.ptCount == 4 && iTest.ptCount == 1) {
- i->intersect(oTest.curve, iLine);
+ i->intersect(oCurve, iLine);
} else if (oTest.ptCount == 4 && iTest.ptCount == 4) {
- i->intersect(oTest.curve, iTest.curve);
+ i->intersect(oCurve, iCurve);
} else {
SkASSERT(0);
}
« no previous file with comments | « tests/PathOpsTestCommon.h ('k') | tests/StrokerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698