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

Unified Diff: tests/PathOpsQuadLineIntersectionTest.cpp

Issue 19374003: harden and speed up path op unit tests (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rename threaded to single Created 7 years, 5 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/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsSimplifyDegenerateThreadedTest.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 4227ee5277a23799174315830117736b8ac7c6d8..02c925cad28409f1a98833fd217855a38f59b0ea 100644
--- a/tests/PathOpsQuadLineIntersectionTest.cpp
+++ b/tests/PathOpsQuadLineIntersectionTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "PathOpsExtendedTest.h"
+#include "PathOpsTestCommon.h"
#include "SkIntersections.h"
#include "SkPathOpsLine.h"
#include "SkPathOpsQuad.h"
@@ -72,7 +73,9 @@ static void testOneOffs(skiatest::Reporter* reporter) {
bool flipped = false;
for (size_t index = 0; index < oneOffs_count; ++index) {
const SkDQuad& quad = oneOffs[index].quad;
+ SkASSERT(ValidQuad(quad));
const SkDLine& line = oneOffs[index].line;
+ SkASSERT(ValidLine(line));
SkIntersections intersections;
int result = doIntersect(intersections, quad, line, flipped);
for (int inner = 0; inner < result; ++inner) {
@@ -93,7 +96,9 @@ static void PathOpsQuadLineIntersectionTest(skiatest::Reporter* reporter) {
for (size_t index = 0; index < lineQuadTests_count; ++index) {
int iIndex = static_cast<int>(index);
const SkDQuad& quad = lineQuadTests[index].quad;
+ SkASSERT(ValidQuad(quad));
const SkDLine& line = lineQuadTests[index].line;
+ SkASSERT(ValidLine(line));
SkReduceOrder reducer1, reducer2;
int order1 = reducer1.reduce(quad, SkReduceOrder::kFill_Style);
int order2 = reducer2.reduce(line);
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsSimplifyDegenerateThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698