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 4792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4803 path.quadTo(3, 2, 0, 3); | 4803 path.quadTo(3, 2, 0, 3); |
4804 path.lineTo(1, 3); | 4804 path.lineTo(1, 3); |
4805 path.close(); | 4805 path.close(); |
4806 path.moveTo(1, 0); | 4806 path.moveTo(1, 0); |
4807 path.lineTo(1, 2); | 4807 path.lineTo(1, 2); |
4808 path.quadTo(3, 2, 1, 3); | 4808 path.quadTo(3, 2, 1, 3); |
4809 path.close(); | 4809 path.close(); |
4810 testSimplify(reporter, path, filename); | 4810 testSimplify(reporter, path, filename); |
4811 } | 4811 } |
4812 | 4812 |
| 4813 static void fuzz864a(skiatest::Reporter* reporter,const char* filename) { |
| 4814 SkPath path; |
| 4815 path.moveTo(10, 90); |
| 4816 path.lineTo(10, 90); |
| 4817 path.lineTo(10, 30); |
| 4818 path.lineTo(10, 30); |
| 4819 path.lineTo(10, 90); |
| 4820 path.close(); |
| 4821 path.moveTo(10, 90); |
| 4822 path.lineTo(10, 90); |
| 4823 path.lineTo(10, 30); |
| 4824 path.lineTo(10, 30); |
| 4825 path.lineTo(10, 90); |
| 4826 path.close(); |
| 4827 path.moveTo(10, 90); |
| 4828 path.lineTo(110, 90); |
| 4829 path.lineTo(110, 30); |
| 4830 path.lineTo(10, 30); |
| 4831 path.lineTo(10, 90); |
| 4832 path.close(); |
| 4833 path.moveTo(10, 30); |
| 4834 path.lineTo(32678, 30); |
| 4835 path.lineTo(32678, 30); |
| 4836 path.lineTo(10, 30); |
| 4837 path.close(); |
| 4838 path.moveTo(10, 3.35545e+07f); |
| 4839 path.lineTo(110, 3.35545e+07f); |
| 4840 path.lineTo(110, 30); |
| 4841 path.lineTo(10, 30); |
| 4842 path.lineTo(10, 3.35545e+07f); |
| 4843 path.close(); |
| 4844 path.moveTo(10, 315); |
| 4845 path.lineTo(110, 315); |
| 4846 path.lineTo(110, 255); |
| 4847 path.lineTo(10, 255); |
| 4848 path.lineTo(10, 315); |
| 4849 path.close(); |
| 4850 path.moveTo(0, 60); |
| 4851 path.lineTo(100, 60); |
| 4852 path.lineTo(100, 0); |
| 4853 path.lineTo(0, 0); |
| 4854 path.lineTo(0, 60); |
| 4855 path.close(); |
| 4856 path.moveTo(10, 90); |
| 4857 path.lineTo(110, 90); |
| 4858 path.lineTo(110, 30); |
| 4859 path.lineTo(10, 30); |
| 4860 path.lineTo(10, 90); |
| 4861 path.close(); |
| 4862 path.moveTo(10, 3.35545e+07f); |
| 4863 path.lineTo(110, 3.35545e+07f); |
| 4864 path.lineTo(110, 30); |
| 4865 path.lineTo(10, 30); |
| 4866 path.lineTo(10, 3.35545e+07f); |
| 4867 path.close(); |
| 4868 path.moveTo(10, 90); |
| 4869 path.lineTo(110, 90); |
| 4870 path.lineTo(110, 30); |
| 4871 path.lineTo(10, 30); |
| 4872 path.lineTo(10, 90); |
| 4873 path.close(); |
| 4874 testSimplify(reporter, path, filename); |
| 4875 } |
| 4876 |
4813 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 4877 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
4814 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 4878 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
4815 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 4879 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
4816 | 4880 |
4817 static TestDesc tests[] = { | 4881 static TestDesc tests[] = { |
| 4882 TEST(fuzz864a), |
4818 TEST(testQuads65), | 4883 TEST(testQuads65), |
4819 TEST(testIssue3838_3), | 4884 TEST(testIssue3838_3), |
4820 TEST(testIssue3838), | 4885 TEST(testIssue3838), |
4821 TEST(testArc), | 4886 TEST(testArc), |
4822 TEST(testTriangle2), | 4887 TEST(testTriangle2), |
4823 TEST(testTriangle1), | 4888 TEST(testTriangle1), |
4824 TEST(testQuads64), | 4889 TEST(testQuads64), |
4825 TEST(testQuads63), | 4890 TEST(testQuads63), |
4826 TEST(testQuads62), | 4891 TEST(testQuads62), |
4827 TEST(testRect4), | 4892 TEST(testRect4), |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5257 | 5322 |
5258 DEF_TEST(PathOpsSimplify, reporter) { | 5323 DEF_TEST(PathOpsSimplify, reporter) { |
5259 if (runSubTests && runSubTestsFirst) { | 5324 if (runSubTests && runSubTestsFirst) { |
5260 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5325 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
5261 } | 5326 } |
5262 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); | 5327 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
5263 if (runSubTests && !runSubTestsFirst) { | 5328 if (runSubTests && !runSubTestsFirst) { |
5264 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); | 5329 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
5265 } | 5330 } |
5266 } | 5331 } |
OLD | NEW |