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

Unified Diff: tests/PathOpsDRectTest.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/PathOpsDCubicTest.cpp ('k') | tests/PathOpsLineParametetersTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsDRectTest.cpp
diff --git a/tests/PathOpsDRectTest.cpp b/tests/PathOpsDRectTest.cpp
index 70d39d15c03ebc0e4ed57a7694d4b4c1ad0d19c4..fa52e780fa6bf6170ce6a0b5169bc0e3e9bcc6c5 100644
--- a/tests/PathOpsDRectTest.cpp
+++ b/tests/PathOpsDRectTest.cpp
@@ -11,7 +11,7 @@
#include "SkPathOpsRect.h"
#include "Test.h"
-static const SkDQuad quadTests[] = {
+static const QuadPts quadTests[] = {
{{{1, 1}, {2, 1}, {0, 2}}},
{{{0, 0}, {1, 1}, {3, 1}}},
{{{2, 0}, {1, 1}, {2, 2}}},
@@ -19,7 +19,7 @@ static const SkDQuad quadTests[] = {
{{{0, 0}, {0, 1}, {1, 1}}},
};
-static const SkDCubic cubicTests[] = {
+static const CubicPts cubicTests[] = {
{{{2, 0}, {3, 1}, {2, 2}, {1, 1}}},
{{{3, 1}, {2, 2}, {1, 1}, {2, 0}}},
{{{3, 0}, {2, 1}, {3, 2}, {1, 1}}},
@@ -45,7 +45,9 @@ DEF_TEST(PathOpsDRect, reporter) {
size_t index;
SkDRect rect, rect2;
for (index = 0; index < quadTests_count; ++index) {
- const SkDQuad& quad = quadTests[index];
+ const QuadPts& q = quadTests[index];
+ SkDQuad quad;
+ quad.debugSet(q.fPts);
SkASSERT(ValidQuad(quad));
setRawBounds(quad, &rect);
rect2.setBounds(quad);
@@ -57,7 +59,9 @@ DEF_TEST(PathOpsDRect, reporter) {
REPORTER_ASSERT(reporter, rect.contains(rightBottom));
}
for (index = 0; index < cubicTests_count; ++index) {
- const SkDCubic& cubic = cubicTests[index];
+ const CubicPts& c = cubicTests[index];
+ SkDCubic cubic;
+ cubic.debugSet(c.fPts);
SkASSERT(ValidCubic(cubic));
setRawBounds(cubic, &rect);
rect2.setBounds(cubic);
« no previous file with comments | « tests/PathOpsDCubicTest.cpp ('k') | tests/PathOpsLineParametetersTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698