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

Unified Diff: tests/PathOpsAngleTest.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 | « no previous file | tests/PathOpsBoundsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsAngleTest.cpp
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp
index 34a77b1fd915ff708a8274d90eed217fab7f6db8..4c362b62769f6c24787c57c2b89e489fd9147502 100644
--- a/tests/PathOpsAngleTest.cpp
+++ b/tests/PathOpsAngleTest.cpp
@@ -4,6 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "PathOpsTestCommon.h"
#include "SkOpSegment.h"
#include "SkTArray.h"
#include "Test.h"
@@ -248,9 +249,11 @@ static void setup(const SortSet* set, const size_t idx,
}
switch(set[idx].ptCount) {
case 2: {
+ SkASSERT(ValidPoints(data, 2));
seg->addLine(data, false, false);
SkDLine dLine;
dLine.set(set[idx].ptData);
+ SkASSERT(ValidLine(dLine));
if (useIntersectPt) {
break;
}
@@ -258,9 +261,11 @@ static void setup(const SortSet* set, const size_t idx,
end = dLine.xyAtT(set[idx].tEnd).asSkPoint();
} break;
case 3: {
+ SkASSERT(ValidPoints(data, 3));
seg->addQuad(data, false, false);
SkDQuad dQuad;
dQuad.set(set[idx].ptData);
+ SkASSERT(ValidQuad(dQuad));
if (useIntersectPt) {
break;
}
@@ -268,9 +273,11 @@ static void setup(const SortSet* set, const size_t idx,
end = dQuad.xyAtT(set[idx].tEnd).asSkPoint();
} break;
case 4: {
+ SkASSERT(ValidPoints(data, 4));
seg->addCubic(data, false, false);
SkDCubic dCubic;
dCubic.set(set[idx].ptData);
+ SkASSERT(ValidCubic(dCubic));
if (useIntersectPt) {
break;
}
« no previous file with comments | « no previous file | tests/PathOpsBoundsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698