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 5737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5748 path.close(); | 5748 path.close(); |
5749 | 5749 |
5750 SkPath path1(path); | 5750 SkPath path1(path); |
5751 path.reset(); | 5751 path.reset(); |
5752 path.setFillType((SkPath::FillType) 0); | 5752 path.setFillType((SkPath::FillType) 0); |
5753 | 5753 |
5754 SkPath path2(path); | 5754 SkPath path2(path); |
5755 testPathFailOp(reporter, path1, path2, (SkPathOp) 2, filename); | 5755 testPathFailOp(reporter, path1, path2, (SkPathOp) 2, filename); |
5756 } | 5756 } |
5757 | 5757 |
| 5758 |
| 5759 static void fuzz753_91(skiatest::Reporter* reporter, const char* filename) { |
| 5760 SkPath path; |
| 5761 path.setFillType((SkPath::FillType) 0); |
| 5762 path.moveTo(SkBits2Float(0x42910000), SkBits2Float(0x00000000)); // 72.5f, 0 |
| 5763 path.lineTo(SkBits2Float(0x42166668), SkBits2Float(0x00000000)); // 37.6f, 0 |
| 5764 path.cubicTo(SkBits2Float(0x42166668), SkBits2Float(0xc1966668), SkBits2Float(0x
41c66668), SkBits2Float(0xc20a6666), SkBits2Float(0x40f00010), SkBits2Float(0xc2
1ccccd)); // 37.6f, -18.8f, 24.8f, -34.6f, 7.50001f, -39.2f |
| 5765 path.lineTo(SkBits2Float(0x41840004), SkBits2Float(0xc291cccd)); // 16.5f, -72.
9f |
| 5766 path.lineTo(SkBits2Float(0x42fb6668), SkBits2Float(0x42c73334)); // 125.7f, 99.
6f |
| 5767 path.lineTo(SkBits2Float(0x43646668), SkBits2Float(0x43880ccd)); // 228.4f, 272
.1f |
| 5768 |
| 5769 SkPath path1(path); |
| 5770 path.reset(); |
| 5771 path.setFillType((SkPath::FillType) 0); |
| 5772 path.moveTo(SkBits2Float(0x428bf702), SkBits2Float(0xcf223cbf)); // 69.9824f, -
2.72189e+09f |
| 5773 path.lineTo(SkBits2Float(0x42112d68), SkBits2Float(0xcf223cbf)); // 36.2943f, -
2.72189e+09f |
| 5774 path.cubicTo(SkBits2Float(0x4220d9fc), SkBits2Float(0xcf223cc0), SkBits2Float(0x
420ee118), SkBits2Float(0xcf223cc0), SkBits2Float(0x41cef2f8), SkBits2Float(0xcf
223cc0)); // 40.2129f, -2.72189e+09f, 35.7198f, -2.72189e+09f, 25.8686f, -2.721
89e+09f |
| 5775 path.lineTo(SkBits2Float(0x424a99e0), SkBits2Float(0xcf223cc0)); // 50.6503f, -
2.72189e+09f |
| 5776 path.cubicTo(SkBits2Float(0x42266e32), SkBits2Float(0xcf223cc0), SkBits2Float(0x
41f0fa20), SkBits2Float(0xcf223cc0), SkBits2Float(0x41872ed4), SkBits2Float(0xcf
223cc0)); // 41.6076f, -2.72189e+09f, 30.1221f, -2.72189e+09f, 16.8979f, -2.721
89e+09f |
| 5777 path.lineTo(SkBits2Float(0x40f8fbe0), SkBits2Float(0xcf223cc0)); // 7.78075f, -
2.72189e+09f |
| 5778 |
| 5779 SkPath path2(path); |
| 5780 testPathFailOp(reporter, path1, path2, (SkPathOp) 2, filename); |
| 5781 } |
| 5782 |
5758 static struct TestDesc failTests[] = { | 5783 static struct TestDesc failTests[] = { |
| 5784 TEST(fuzz753_91), |
5759 TEST(fuzz714), | 5785 TEST(fuzz714), |
5760 TEST(fuzz487a), | 5786 TEST(fuzz487a), |
5761 TEST(fuzz433), | 5787 TEST(fuzz433), |
5762 TEST(fuzz1), | 5788 TEST(fuzz1), |
5763 TEST(fuzz487b), | 5789 TEST(fuzz487b), |
5764 TEST(fuzz433b), | 5790 TEST(fuzz433b), |
5765 TEST(bufferOverflow), | 5791 TEST(bufferOverflow), |
5766 }; | 5792 }; |
5767 | 5793 |
5768 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); | 5794 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
5769 | 5795 |
5770 DEF_TEST(PathOpsFailOp, reporter) { | 5796 DEF_TEST(PathOpsFailOp, reporter) { |
5771 #if DEBUG_SHOW_TEST_NAME | 5797 #if DEBUG_SHOW_TEST_NAME |
5772 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 5798 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
5773 #endif | 5799 #endif |
5774 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa
lse); | 5800 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa
lse); |
5775 } | 5801 } |
OLD | NEW |