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

Side by Side Diff: tests/PathOpsQuadReduceOrderTest.cpp

Issue 633393002: harden pathops for pathological test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: exclude new test that asserts in debug Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsSkpTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsQuadIntersectionTestData.h" 7 #include "PathOpsQuadIntersectionTestData.h"
8 #include "SkIntersections.h" 8 #include "SkIntersections.h"
9 #include "SkPathOpsRect.h" 9 #include "SkPathOpsRect.h"
10 #include "SkReduceOrder.h" 10 #include "SkReduceOrder.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 for (index = firstQuadraticLineTest; index < quadraticLines_count; ++index) { 49 for (index = firstQuadraticLineTest; index < quadraticLines_count; ++index) {
50 const SkDQuad& quad = quadraticLines[index]; 50 const SkDQuad& quad = quadraticLines[index];
51 order = reducer.reduce(quad); 51 order = reducer.reduce(quad);
52 if (order != 2) { 52 if (order != 2) {
53 SkDebugf("[%d] line quad order=%d\n", (int) index, order); 53 SkDebugf("[%d] line quad order=%d\n", (int) index, order);
54 } 54 }
55 } 55 }
56 for (index = firstQuadraticModLineTest; index < quadraticModEpsilonLines_cou nt; ++index) { 56 for (index = firstQuadraticModLineTest; index < quadraticModEpsilonLines_cou nt; ++index) {
57 const SkDQuad& quad = quadraticModEpsilonLines[index]; 57 const SkDQuad& quad = quadraticModEpsilonLines[index];
58 order = reducer.reduce(quad); 58 order = reducer.reduce(quad);
59 if (order != 3) { 59 if (order != 2 && order != 3) { // FIXME: data probably is not good
60 SkDebugf("[%d] line mod quad order=%d\n", (int) index, order); 60 SkDebugf("[%d] line mod quad order=%d\n", (int) index, order);
61 } 61 }
62 } 62 }
63 } 63 }
64 64
65 DEF_TEST(PathOpsReduceOrderQuad, reporter) { 65 DEF_TEST(PathOpsReduceOrderQuad, reporter) {
66 oneOffTest(reporter); 66 oneOffTest(reporter);
67 standardTestCases(reporter); 67 standardTestCases(reporter);
68 } 68 }
OLDNEW
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | tests/PathOpsSkpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698