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

Unified Diff: experimental/Intersection/QuadraticReduceOrder_Test.cpp

Issue 867213004: remove prototype pathops code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
Index: experimental/Intersection/QuadraticReduceOrder_Test.cpp
diff --git a/experimental/Intersection/QuadraticReduceOrder_Test.cpp b/experimental/Intersection/QuadraticReduceOrder_Test.cpp
deleted file mode 100644
index e9e8b4bc9297a8a35f1e7c887d0132f272f494f1..0000000000000000000000000000000000000000
--- a/experimental/Intersection/QuadraticReduceOrder_Test.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "CurveIntersection.h"
-#include "Intersection_Tests.h"
-#include "QuadraticIntersection_TestData.h"
-#include "TestUtilities.h"
-
-static const Quadratic testSet[] = {
- {{1, 1}, {2, 2}, {1, 1.000003}},
- {{1, 0}, {2, 6}, {3, 0}}
-};
-
-static const size_t testSetCount = sizeof(testSet) / sizeof(testSet[0]);
-
-
-static void oneOffTest() {
- SkDebugf("%s FLT_EPSILON=%1.9g\n", __FUNCTION__, FLT_EPSILON);
- for (size_t index = 0; index < testSetCount; ++index) {
- const Quadratic& quad = testSet[index];
- Quadratic reduce;
- SkDEBUGCODE(int result = ) reduceOrder(quad, reduce, kReduceOrder_TreatAsFill);
- SkASSERT(result == 3);
- }
-}
-
-static void standardTestCases() {
- size_t index;
- Quadratic reduce;
- int order;
- enum {
- RunAll,
- RunQuadraticLines,
- RunQuadraticModLines,
- RunNone
- } run = RunAll;
- int firstTestIndex = 0;
-#if 0
- run = RunQuadraticLines;
- firstTestIndex = 1;
-#endif
- int firstQuadraticLineTest = run == RunAll ? 0 : run == RunQuadraticLines ? firstTestIndex : SK_MaxS32;
- int firstQuadraticModLineTest = run == RunAll ? 0 : run == RunQuadraticModLines ? firstTestIndex : SK_MaxS32;
-
- for (index = firstQuadraticLineTest; index < quadraticLines_count; ++index) {
- const Quadratic& quad = quadraticLines[index];
- order = reduceOrder(quad, reduce, kReduceOrder_TreatAsFill);
- if (order != 2) {
- printf("[%d] line quad order=%d\n", (int) index, order);
- }
- }
- for (index = firstQuadraticModLineTest; index < quadraticModEpsilonLines_count; ++index) {
- const Quadratic& quad = quadraticModEpsilonLines[index];
- order = reduceOrder(quad, reduce, kReduceOrder_TreatAsFill);
- if (order != 3) {
- printf("[%d] line mod quad order=%d\n", (int) index, order);
- }
- }
-}
-
-void QuadraticReduceOrder_Test() {
- oneOffTest();
- standardTestCases();
-}
« no previous file with comments | « experimental/Intersection/QuadraticReduceOrder.cpp ('k') | experimental/Intersection/QuadraticSubDivide.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698