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

Unified Diff: tests/PathOpsCubicLineIntersectionTest.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/PathOpsCubicLineIntersectionIdeas.cpp ('k') | tests/PathOpsCubicQuadIntersectionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsCubicLineIntersectionTest.cpp
diff --git a/tests/PathOpsCubicLineIntersectionTest.cpp b/tests/PathOpsCubicLineIntersectionTest.cpp
index a2b870d0005fbdcfa80417ce87aa16b8463c9698..a6ae5e644109e187b288aace6c7a283e6bf6ee55 100644
--- a/tests/PathOpsCubicLineIntersectionTest.cpp
+++ b/tests/PathOpsCubicLineIntersectionTest.cpp
@@ -12,7 +12,7 @@
#include "Test.h"
struct lineCubic {
- SkDCubic cubic;
+ CubicPts cubic;
SkDLine line;
};
@@ -25,7 +25,9 @@ static lineCubic failLineCubicTests[] = {
static const size_t failLineCubicTests_count = SK_ARRAY_COUNT(failLineCubicTests);
static void testFail(skiatest::Reporter* reporter, int iIndex) {
- const SkDCubic& cubic = failLineCubicTests[iIndex].cubic;
+ const CubicPts& cuPts = failLineCubicTests[iIndex].cubic;
+ SkDCubic cubic;
+ cubic.debugSet(cuPts.fPts);
SkASSERT(ValidCubic(cubic));
const SkDLine& line = failLineCubicTests[iIndex].line;
SkASSERT(ValidLine(line));
@@ -123,7 +125,9 @@ static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, co
}
static void testOne(skiatest::Reporter* reporter, int iIndex) {
- const SkDCubic& cubic = lineCubicTests[iIndex].cubic;
+ const CubicPts& cuPts = lineCubicTests[iIndex].cubic;
+ SkDCubic cubic;
+ cubic.debugSet(cuPts.fPts);
SkASSERT(ValidCubic(cubic));
const SkDLine& line = lineCubicTests[iIndex].line;
SkASSERT(ValidLine(line));
@@ -188,7 +192,9 @@ DEF_TEST(PathOpsCubicLineIntersection, reporter) {
DEF_TEST(PathOpsCubicLineIntersectionOneOff, reporter) {
int iIndex = 0;
testOne(reporter, iIndex);
- const SkDCubic& cubic = lineCubicTests[iIndex].cubic;
+ const CubicPts& cuPts = lineCubicTests[iIndex].cubic;
+ SkDCubic cubic;
+ cubic.debugSet(cuPts.fPts);
const SkDLine& line = lineCubicTests[iIndex].line;
SkIntersections i;
i.intersect(cubic, line);
« no previous file with comments | « tests/PathOpsCubicLineIntersectionIdeas.cpp ('k') | tests/PathOpsCubicQuadIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698