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 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 | 9 |
10 class PathTest_Private { | 10 class PathTest_Private { |
(...skipping 5135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5146 path.moveTo(1, 3); | 5146 path.moveTo(1, 3); |
5147 path.cubicTo(2, 6, 4, 3, 5, 2); | 5147 path.cubicTo(2, 6, 4, 3, 5, 2); |
5148 path.close(); | 5148 path.close(); |
5149 pathB.setFillType(SkPath::kWinding_FillType); | 5149 pathB.setFillType(SkPath::kWinding_FillType); |
5150 pathB.moveTo(3, 4); | 5150 pathB.moveTo(3, 4); |
5151 pathB.cubicTo(2, 5, 3, 1, 6, 2); | 5151 pathB.cubicTo(2, 5, 3, 1, 6, 2); |
5152 pathB.close(); | 5152 pathB.close(); |
5153 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); | 5153 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
5154 } | 5154 } |
5155 | 5155 |
| 5156 static void fuzz38(skiatest::Reporter* reporter, const char* filename) { |
| 5157 SkPath path, pathB; |
| 5158 path.moveTo(100.34f, 303.312f); |
| 5159 path.lineTo(-1e+08, 303.312f); |
| 5160 path.lineTo(102, 310.156f); |
| 5161 path.lineTo(100.34f, 310.156f); |
| 5162 path.lineTo(100.34f, 303.312f); |
| 5163 path.close(); |
| 5164 testPathOpCheck(reporter, path, pathB, kUnion_SkPathOp, filename, FLAGS_runF
ail); |
| 5165 } |
| 5166 |
5156 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; | 5167 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
5157 static void (*firstTest)(skiatest::Reporter* , const char* filename) = loops63i; | 5168 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
5158 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 5169 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
5159 | 5170 |
5160 #define TEST(name) { name, #name } | 5171 #define TEST(name) { name, #name } |
5161 | 5172 |
5162 static struct TestDesc tests[] = { | 5173 static struct TestDesc tests[] = { |
| 5174 TEST(fuzz38), |
5163 TEST(cubics44d), | 5175 TEST(cubics44d), |
5164 TEST(cubics45u), | 5176 TEST(cubics45u), |
5165 TEST(loops61i), | 5177 TEST(loops61i), |
5166 TEST(loops62i), | 5178 TEST(loops62i), |
5167 TEST(loops63i), | 5179 TEST(loops63i), |
5168 TEST(loops58iAsQuads), | 5180 TEST(loops58iAsQuads), |
5169 TEST(cubics41d), | 5181 TEST(cubics41d), |
5170 TEST(loops59iasQuads), | 5182 TEST(loops59iasQuads), |
5171 TEST(loops59i), | 5183 TEST(loops59i), |
5172 TEST(loops44i), | 5184 TEST(loops44i), |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5726 }; | 5738 }; |
5727 | 5739 |
5728 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); | 5740 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
5729 | 5741 |
5730 DEF_TEST(PathOpsFailOp, reporter) { | 5742 DEF_TEST(PathOpsFailOp, reporter) { |
5731 #if DEBUG_SHOW_TEST_NAME | 5743 #if DEBUG_SHOW_TEST_NAME |
5732 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 5744 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
5733 #endif | 5745 #endif |
5734 RunTestSet(reporter, failTests, failTestCount, NULL, NULL, NULL, false); | 5746 RunTestSet(reporter, failTests, failTestCount, NULL, NULL, NULL, false); |
5735 } | 5747 } |
OLD | NEW |