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

Unified Diff: tests/PathOpsConicLineIntersectionTest.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/PathOpsConicIntersectionTest.cpp ('k') | tests/PathOpsConicQuadIntersectionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsConicLineIntersectionTest.cpp
diff --git a/tests/PathOpsConicLineIntersectionTest.cpp b/tests/PathOpsConicLineIntersectionTest.cpp
index ecc4a47f179f044efd1fdc64fd03f4c89c6ae01e..c3d4a2afe3a4c2d2a14ff2f40e3b5cfb328f82af 100644
--- a/tests/PathOpsConicLineIntersectionTest.cpp
+++ b/tests/PathOpsConicLineIntersectionTest.cpp
@@ -14,7 +14,7 @@
#include "Test.h"
static struct lineConic {
- SkDConic conic;
+ ConicPts conic;
SkDLine line;
int result;
SkDPoint expected[2];
@@ -57,7 +57,7 @@ static int doIntersect(SkIntersections& intersections, const SkDConic& conic, co
}
static struct oneLineConic {
- SkDConic conic;
+ ConicPts conic;
SkDLine line;
} oneOffs[] = {
{{{{{30.6499996,25.6499996}, {30.6499996,20.6499996}, {25.6499996,20.6499996}}}, 0.707107008f},
@@ -69,7 +69,9 @@ static size_t oneOffs_count = SK_ARRAY_COUNT(oneOffs);
static void testOneOffs(skiatest::Reporter* reporter) {
bool flipped = false;
for (size_t index = 0; index < oneOffs_count; ++index) {
- const SkDConic& conic = oneOffs[index].conic;
+ const ConicPts& c = oneOffs[index].conic;
+ SkDConic conic;
+ conic.debugSet(c.fPts.fPts, c.fWeight);
SkASSERT(ValidConic(conic));
const SkDLine& line = oneOffs[index].line;
SkASSERT(ValidLine(line));
@@ -96,7 +98,9 @@ DEF_TEST(PathOpsConicLineIntersectionOneOff, reporter) {
DEF_TEST(PathOpsConicLineIntersection, reporter) {
for (size_t index = 0; index < lineConicTests_count; ++index) {
int iIndex = static_cast<int>(index);
- const SkDConic& conic = lineConicTests[index].conic;
+ const ConicPts& c = lineConicTests[index].conic;
+ SkDConic conic;
+ conic.debugSet(c.fPts.fPts, c.fWeight);
SkASSERT(ValidConic(conic));
const SkDLine& line = lineConicTests[index].line;
SkASSERT(ValidLine(line));
« no previous file with comments | « tests/PathOpsConicIntersectionTest.cpp ('k') | tests/PathOpsConicQuadIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698