| 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 4734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4745 path.lineTo(1, 0); | 4745 path.lineTo(1, 0); |
| 4746 path.lineTo(0, 1); | 4746 path.lineTo(0, 1); |
| 4747 path.close(); | 4747 path.close(); |
| 4748 path.moveTo(2, 0); | 4748 path.moveTo(2, 0); |
| 4749 path.lineTo(0, 2); | 4749 path.lineTo(0, 2); |
| 4750 path.lineTo(2, 2); | 4750 path.lineTo(2, 2); |
| 4751 path.close(); | 4751 path.close(); |
| 4752 testSimplify(reporter, path, filename); | 4752 testSimplify(reporter, path, filename); |
| 4753 } | 4753 } |
| 4754 | 4754 |
| 4755 static void testArc(skiatest::Reporter* reporter,const char* filename) { |
| 4756 SkRect r = SkRect::MakeWH(150, 100); |
| 4757 SkPath path; |
| 4758 path.arcTo(r, 0, 0.0025f, false); |
| 4759 testSimplify(reporter, path, filename); |
| 4760 } |
| 4761 |
| 4755 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 4762 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4756 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 4763 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4757 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 4764 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
| 4758 | 4765 |
| 4759 static TestDesc tests[] = { | 4766 static TestDesc tests[] = { |
| 4767 TEST(testArc), |
| 4760 TEST(testTriangle2), | 4768 TEST(testTriangle2), |
| 4761 TEST(testTriangle1), | 4769 TEST(testTriangle1), |
| 4762 TEST(testQuads64), | 4770 TEST(testQuads64), |
| 4763 TEST(testQuads63), | 4771 TEST(testQuads63), |
| 4764 TEST(testQuads62), | 4772 TEST(testQuads62), |
| 4765 TEST(testRect4), | 4773 TEST(testRect4), |
| 4766 TEST(testRect3), | 4774 TEST(testRect3), |
| 4767 TEST(testQuadralateral10), | 4775 TEST(testQuadralateral10), |
| 4768 TEST(testQuads61), | 4776 TEST(testQuads61), |
| 4769 TEST(testQuads60), | 4777 TEST(testQuads60), |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5195 | 5203 |
| 5196 DEF_TEST(PathOpsSimplify, reporter) { | 5204 DEF_TEST(PathOpsSimplify, reporter) { |
| 5197 if (runSubTests && runSubTestsFirst) { | 5205 if (runSubTests && runSubTestsFirst) { |
| 5198 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5206 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
| 5199 } | 5207 } |
| 5200 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5208 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
| 5201 if (runSubTests && !runSubTestsFirst) { | 5209 if (runSubTests && !runSubTestsFirst) { |
| 5202 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5210 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
| 5203 } | 5211 } |
| 5204 } | 5212 } |
| OLD | NEW |