OLD | NEW |
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" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 {{{{0, 0}, {1, 0}}}, {{{3, 0}, {2, 0}}}}, | 47 {{{{0, 0}, {1, 0}}}, {{{3, 0}, {2, 0}}}}, |
48 {{{{0, 0}, {0, 0}}}, {{{1, 0}, {2, 0}}}}, | 48 {{{{0, 0}, {0, 0}}}, {{{1, 0}, {2, 0}}}}, |
49 {{{{0, 1}, {0, 1}}}, {{{0, 3}, {0, 2}}}}, | 49 {{{{0, 1}, {0, 1}}}, {{{0, 3}, {0, 2}}}}, |
50 {{{{0, 0}, {1, 0}}}, {{{2, 0}, {3, 0}}}}, | 50 {{{{0, 0}, {1, 0}}}, {{{2, 0}, {3, 0}}}}, |
51 {{{{1, 1}, {2, 2}}}, {{{4, 4}, {3, 3}}}}, | 51 {{{{1, 1}, {2, 2}}}, {{{4, 4}, {3, 3}}}}, |
52 }; | 52 }; |
53 | 53 |
54 static const size_t noIntersect_count = SK_ARRAY_COUNT(noIntersect); | 54 static const size_t noIntersect_count = SK_ARRAY_COUNT(noIntersect); |
55 | 55 |
56 static const SkDLine coincidentTests[][2] = { | 56 static const SkDLine coincidentTests[][2] = { |
| 57 {{{ {-1.48383003e-006,-83}, {4.2268899e-014,-60} }}, |
| 58 {{ {9.5359502e-007,-60}, {5.08227985e-015,-83} }}}, |
| 59 |
57 {{{ { 10105, 2510 }, { 10123, 2509.98999f } }}, | 60 {{{ { 10105, 2510 }, { 10123, 2509.98999f } }}, |
58 {{{10105, 2509.98999f}, { 10123, 2510 } }}}, | 61 {{{10105, 2509.98999f}, { 10123, 2510 } }}}, |
59 | 62 |
60 {{ { { 0, 482.5 }, { -4.4408921e-016, 682.5 } } }, | 63 {{ { { 0, 482.5 }, { -4.4408921e-016, 682.5 } } }, |
61 {{{0,683}, {0,482}}}}, | 64 {{{0,683}, {0,482}}}}, |
62 | 65 |
63 {{{{1.77635684e-015,312}, {-1.24344979e-014,348}}}, | 66 {{{{1.77635684e-015,312}, {-1.24344979e-014,348}}}, |
64 {{{0,348}, {0,312}}}}, | 67 {{{0,348}, {0,312}}}}, |
65 | 68 |
66 {{{{979.304871, 561}, {1036.69507, 291}}}, | 69 {{{{979.304871, 561}, {1036.69507, 291}}}, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 testOne(reporter, tests[1][0], tests[1][1]); | 221 testOne(reporter, tests[1][0], tests[1][1]); |
219 } | 222 } |
220 | 223 |
221 DEF_TEST(PathOpsLineIntersectionOneCoincident, reporter) { | 224 DEF_TEST(PathOpsLineIntersectionOneCoincident, reporter) { |
222 int index = 0; | 225 int index = 0; |
223 SkASSERT(index < (int) coincidentTests_count); | 226 SkASSERT(index < (int) coincidentTests_count); |
224 const SkDLine& line1 = coincidentTests[index][0]; | 227 const SkDLine& line1 = coincidentTests[index][0]; |
225 const SkDLine& line2 = coincidentTests[index][1]; | 228 const SkDLine& line2 = coincidentTests[index][1]; |
226 testOneCoincident(reporter, line1, line2); | 229 testOneCoincident(reporter, line1, line2); |
227 } | 230 } |
OLD | NEW |