| 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 "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
| 8 | 8 |
| 9 #define TEST(name) { name, #name } | 9 #define TEST(name) { name, #name } |
| 10 | 10 |
| (...skipping 4741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4752 testSimplify(reporter, path, filename); | 4752 testSimplify(reporter, path, filename); |
| 4753 } | 4753 } |
| 4754 | 4754 |
| 4755 static void testArc(skiatest::Reporter* reporter,const char* filename) { | 4755 static void testArc(skiatest::Reporter* reporter,const char* filename) { |
| 4756 SkRect r = SkRect::MakeWH(150, 100); | 4756 SkRect r = SkRect::MakeWH(150, 100); |
| 4757 SkPath path; | 4757 SkPath path; |
| 4758 path.arcTo(r, 0, 0.0025f, false); | 4758 path.arcTo(r, 0, 0.0025f, false); |
| 4759 testSimplify(reporter, path, filename); | 4759 testSimplify(reporter, path, filename); |
| 4760 } | 4760 } |
| 4761 | 4761 |
| 4762 static void testIssue3838(skiatest::Reporter* reporter,const char* filename) { |
| 4763 SkPath path; |
| 4764 path.moveTo(220, 170); |
| 4765 path.lineTo(200, 170); |
| 4766 path.lineTo(200, 190); |
| 4767 path.lineTo(180, 190); |
| 4768 path.lineTo(180, 210); |
| 4769 path.lineTo(200, 210); |
| 4770 path.lineTo(200, 250); |
| 4771 path.lineTo(260, 250); |
| 4772 path.lineTo(260, 190); |
| 4773 path.lineTo(220, 190); |
| 4774 path.lineTo(220, 170); |
| 4775 path.close(); |
| 4776 path.moveTo(220, 210); |
| 4777 path.lineTo(220, 230); |
| 4778 path.lineTo(240, 230); |
| 4779 path.lineTo(240, 210); |
| 4780 path.lineTo(220, 210); |
| 4781 path.close(); |
| 4782 testSimplify(reporter, path, filename); |
| 4783 } |
| 4784 |
| 4762 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 4785 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4763 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 4786 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4764 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 4787 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4765 | 4788 |
| 4766 static TestDesc tests[] = { | 4789 static TestDesc tests[] = { |
| 4790 TEST(testIssue3838), |
| 4767 TEST(testArc), | 4791 TEST(testArc), |
| 4768 TEST(testTriangle2), | 4792 TEST(testTriangle2), |
| 4769 TEST(testTriangle1), | 4793 TEST(testTriangle1), |
| 4770 TEST(testQuads64), | 4794 TEST(testQuads64), |
| 4771 TEST(testQuads63), | 4795 TEST(testQuads63), |
| 4772 TEST(testQuads62), | 4796 TEST(testQuads62), |
| 4773 TEST(testRect4), | 4797 TEST(testRect4), |
| 4774 TEST(testRect3), | 4798 TEST(testRect3), |
| 4775 TEST(testQuadralateral10), | 4799 TEST(testQuadralateral10), |
| 4776 TEST(testQuads61), | 4800 TEST(testQuads61), |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5203 | 5227 |
| 5204 DEF_TEST(PathOpsSimplify, reporter) { | 5228 DEF_TEST(PathOpsSimplify, reporter) { |
| 5205 if (runSubTests && runSubTestsFirst) { | 5229 if (runSubTests && runSubTestsFirst) { |
| 5206 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5230 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
| 5207 } | 5231 } |
| 5208 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5232 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
| 5209 if (runSubTests && !runSubTestsFirst) { | 5233 if (runSubTests && !runSubTestsFirst) { |
| 5210 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5234 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
| 5211 } | 5235 } |
| 5212 } | 5236 } |
| OLD | NEW |