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

Unified Diff: tests/PathOpsQuadLineIntersectionTest.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/PathOpsQuadIntersectionTestData.cpp ('k') | tests/PathOpsQuadLineIntersectionThreadedTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsQuadLineIntersectionTest.cpp
diff --git a/tests/PathOpsQuadLineIntersectionTest.cpp b/tests/PathOpsQuadLineIntersectionTest.cpp
index 6a9e497b9118abc5960382a302bb5ccaa238a7d4..f24b2e4d7ad3dbaaa3865c1c00559dac672e7648 100644
--- a/tests/PathOpsQuadLineIntersectionTest.cpp
+++ b/tests/PathOpsQuadLineIntersectionTest.cpp
@@ -13,7 +13,7 @@
#include "Test.h"
static struct lineQuad {
- SkDQuad quad;
+ QuadPts quad;
SkDLine line;
int result;
SkDPoint expected[2];
@@ -56,7 +56,7 @@ static int doIntersect(SkIntersections& intersections, const SkDQuad& quad, cons
}
static struct oneLineQuad {
- SkDQuad quad;
+ QuadPts quad;
SkDLine line;
} oneOffs[] = {
{{{{97.9337616,100}, {88,112.94265}, {88,130}}},
@@ -79,7 +79,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 SkDQuad& quad = oneOffs[index].quad;
+ const QuadPts& q = oneOffs[index].quad;
+ SkDQuad quad;
+ quad.debugSet(q.fPts);
SkASSERT(ValidQuad(quad));
const SkDLine& line = oneOffs[index].line;
SkASSERT(ValidLine(line));
@@ -106,7 +108,9 @@ DEF_TEST(PathOpsQuadLineIntersectionOneOff, reporter) {
DEF_TEST(PathOpsQuadLineIntersection, reporter) {
for (size_t index = 0; index < lineQuadTests_count; ++index) {
int iIndex = static_cast<int>(index);
- const SkDQuad& quad = lineQuadTests[index].quad;
+ const QuadPts& q = lineQuadTests[index].quad;
+ SkDQuad quad;
+ quad.debugSet(q.fPts);
SkASSERT(ValidQuad(quad));
const SkDLine& line = lineQuadTests[index].line;
SkASSERT(ValidLine(line));
« no previous file with comments | « tests/PathOpsQuadIntersectionTestData.cpp ('k') | tests/PathOpsQuadLineIntersectionThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698