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

Side by Side Diff: tests/PathOpsLineIntersectionTest.cpp

Issue 400033002: update pathops core and tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix uninitialized variable Created 6 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 unified diff | Download patch
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsOpTest.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 "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkIntersections.h" 8 #include "SkIntersections.h"
9 #include "SkPathOpsLine.h" 9 #include "SkPathOpsLine.h"
10 #include "Test.h" 10 #include "Test.h"
11 11
12 // FIXME: add tests for intersecting, non-intersecting, degenerate, coincident 12 // FIXME: add tests for intersecting, non-intersecting, degenerate, coincident
13 static const SkDLine tests[][2] = { 13 static const SkDLine tests[][2] = {
14 #if 0
15 // these do intersect at a pair of points, but not close enough for check re sults liking
16 {{{{365.848175,5081.15186}, {368,5103}}}, {{{367.967712,5102.61084}, {368.27 8717,5105.71045}}}},
17 #endif
14 {{{{30,20}, {30,50}}}, {{{24,30}, {36,30}}}}, 18 {{{{30,20}, {30,50}}}, {{{24,30}, {36,30}}}},
15 {{{{323,193}, {-317,193}}}, {{{0,994}, {0,0}}}}, 19 {{{{323,193}, {-317,193}}}, {{{0,994}, {0,0}}}},
16 {{{{90,230}, {160,60}}}, {{{60,120}, {260,120}}}}, 20 {{{{90,230}, {160,60}}}, {{{60,120}, {260,120}}}},
17 {{{{90,230}, {160,60}}}, {{{181.176468,120}, {135.294128,120}}}}, 21 {{{{90,230}, {160,60}}}, {{{181.176468,120}, {135.294128,120}}}},
18 {{{{181.1764678955078125f, 120}, {186.3661956787109375f, 134.7042236328125f} }}, 22 {{{{181.1764678955078125f, 120}, {186.3661956787109375f, 134.7042236328125f} }},
19 {{{175.8309783935546875f, 141.5211334228515625f}, {187.8782806396484375f, 1 33.7258148193359375f}}}}, 23 {{{175.8309783935546875f, 141.5211334228515625f}, {187.8782806396484375f, 1 33.7258148193359375f}}}},
20 #if 0 // FIXME: these fail because one line is too short and appears quasi-coin cident 24 #if 0 // FIXME: these fail because one line is too short and appears quasi-coin cident
21 {{{{158.000000, 926.000000}, {1108.00000, 926.000000}}}, 25 {{{{158.000000, 926.000000}, {1108.00000, 926.000000}}},
22 {{{1108.00000, 926.000000}, {1108.00000, 925.999634}}}}, 26 {{{1108.00000, 926.000000}, {1108.00000, 925.999634}}}},
23 {{{{1108,926}, {1108,925.9996337890625}}}, {{{158,926}, {1108,926}}}}, 27 {{{{1108,926}, {1108,925.9996337890625}}}, {{{158,926}, {1108,926}}}},
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 testOne(reporter, tests[1][0], tests[1][1]); 218 testOne(reporter, tests[1][0], tests[1][1]);
215 } 219 }
216 220
217 DEF_TEST(PathOpsLineIntersectionOneCoincident, reporter) { 221 DEF_TEST(PathOpsLineIntersectionOneCoincident, reporter) {
218 int index = 0; 222 int index = 0;
219 SkASSERT(index < (int) coincidentTests_count); 223 SkASSERT(index < (int) coincidentTests_count);
220 const SkDLine& line1 = coincidentTests[index][0]; 224 const SkDLine& line1 = coincidentTests[index][0];
221 const SkDLine& line2 = coincidentTests[index][1]; 225 const SkDLine& line2 = coincidentTests[index][1];
222 testOneCoincident(reporter, line1, line2); 226 testOneCoincident(reporter, line1, line2);
223 } 227 }
OLDNEW
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698