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 "PathOpsCubicIntersectionTestData.h" | 7 #include "PathOpsCubicIntersectionTestData.h" |
8 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 #include "SkIntersections.h" | 9 #include "SkIntersections.h" |
10 #include "SkPathOpsRect.h" | 10 #include "SkPathOpsRect.h" |
11 #include "SkReduceOrder.h" | 11 #include "SkReduceOrder.h" |
12 #include "Test.h" | 12 #include "Test.h" |
13 #include "TestClassDef.h" | |
14 | 13 |
15 const int firstCubicIntersectionTest = 9; | 14 const int firstCubicIntersectionTest = 9; |
16 | 15 |
17 static void standardTestCases(skiatest::Reporter* reporter) { | 16 static void standardTestCases(skiatest::Reporter* reporter) { |
18 for (size_t index = firstCubicIntersectionTest; index < tests_count; ++index
) { | 17 for (size_t index = firstCubicIntersectionTest; index < tests_count; ++index
) { |
19 int iIndex = static_cast<int>(index); | 18 int iIndex = static_cast<int>(index); |
20 const SkDCubic& cubic1 = tests[index][0]; | 19 const SkDCubic& cubic1 = tests[index][0]; |
21 const SkDCubic& cubic2 = tests[index][1]; | 20 const SkDCubic& cubic2 = tests[index][1]; |
22 SkReduceOrder reduce1, reduce2; | 21 SkReduceOrder reduce1, reduce2; |
23 int order1 = reduce1.reduce(cubic1, SkReduceOrder::kNo_Quadratics); | 22 int order1 = reduce1.reduce(cubic1, SkReduceOrder::kNo_Quadratics); |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 } | 631 } |
633 | 632 |
634 DEF_TEST(PathOpsCubicIntersection, reporter) { | 633 DEF_TEST(PathOpsCubicIntersection, reporter) { |
635 oneOffTests(reporter); | 634 oneOffTests(reporter); |
636 cubicIntersectionSelfTest(reporter); | 635 cubicIntersectionSelfTest(reporter); |
637 cubicIntersectionCoinTest(reporter); | 636 cubicIntersectionCoinTest(reporter); |
638 standardTestCases(reporter); | 637 standardTestCases(reporter); |
639 if (false) CubicIntersection_IntersectionFinder(); | 638 if (false) CubicIntersection_IntersectionFinder(); |
640 if (false) CubicIntersection_RandTest(reporter); | 639 if (false) CubicIntersection_RandTest(reporter); |
641 } | 640 } |
OLD | NEW |