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 4764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4775 path.close(); | 4775 path.close(); |
4776 path.moveTo(220, 210); | 4776 path.moveTo(220, 210); |
4777 path.lineTo(220, 230); | 4777 path.lineTo(220, 230); |
4778 path.lineTo(240, 230); | 4778 path.lineTo(240, 230); |
4779 path.lineTo(240, 210); | 4779 path.lineTo(240, 210); |
4780 path.lineTo(220, 210); | 4780 path.lineTo(220, 210); |
4781 path.close(); | 4781 path.close(); |
4782 testSimplify(reporter, path, filename); | 4782 testSimplify(reporter, path, filename); |
4783 } | 4783 } |
4784 | 4784 |
| 4785 static void testIssue3838_3(skiatest::Reporter* reporter,const char* filename) { |
| 4786 SkPath path; |
| 4787 path.moveTo(40, 10); |
| 4788 path.lineTo(60, 10); |
| 4789 path.lineTo(60, 30); |
| 4790 path.lineTo(40, 30); |
| 4791 path.lineTo(40, 10); |
| 4792 path.moveTo(41, 11); |
| 4793 path.lineTo(41, 29); |
| 4794 path.lineTo(59, 29); |
| 4795 path.lineTo(59, 11); |
| 4796 path.lineTo(41, 11); |
| 4797 testSimplify(reporter, path, filename); |
| 4798 } |
| 4799 |
4785 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 4800 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
4786 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 4801 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
4787 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 4802 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
4788 | 4803 |
4789 static TestDesc tests[] = { | 4804 static TestDesc tests[] = { |
| 4805 TEST(testIssue3838_3), |
4790 TEST(testIssue3838), | 4806 TEST(testIssue3838), |
4791 TEST(testArc), | 4807 TEST(testArc), |
4792 TEST(testTriangle2), | 4808 TEST(testTriangle2), |
4793 TEST(testTriangle1), | 4809 TEST(testTriangle1), |
4794 TEST(testQuads64), | 4810 TEST(testQuads64), |
4795 TEST(testQuads63), | 4811 TEST(testQuads63), |
4796 TEST(testQuads62), | 4812 TEST(testQuads62), |
4797 TEST(testRect4), | 4813 TEST(testRect4), |
4798 TEST(testRect3), | 4814 TEST(testRect3), |
4799 TEST(testQuadralateral10), | 4815 TEST(testQuadralateral10), |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5227 | 5243 |
5228 DEF_TEST(PathOpsSimplify, reporter) { | 5244 DEF_TEST(PathOpsSimplify, reporter) { |
5229 if (runSubTests && runSubTestsFirst) { | 5245 if (runSubTests && runSubTestsFirst) { |
5230 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5246 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
5231 } | 5247 } |
5232 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5248 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
5233 if (runSubTests && !runSubTestsFirst) { | 5249 if (runSubTests && !runSubTestsFirst) { |
5234 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5250 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
5235 } | 5251 } |
5236 } | 5252 } |
OLD | NEW |