Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 2404483002: fix fuzz busters (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8072 matching lines...) Expand 10 before | Expand all | Expand 10 after
8083 path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10 f, 6.40969e-10f 8083 path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10 f, 6.40969e-10f
8084 path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10 f, 6.40969e-10f 8084 path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10 f, 6.40969e-10f
8085 path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10 f, 6.40969e-10f 8085 path.lineTo(SkBits2Float(0x30303030), SkBits2Float(0x30303030)); // 6.40969e-10 f, 6.40969e-10f
8086 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x7878788d)); // 2.01583e+34 f, 2.01584e+34f 8086 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x7878788d)); // 2.01583e+34 f, 2.01584e+34f
8087 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x30303030)); // 2.01583e+34 f, 6.40969e-10f 8087 path.lineTo(SkBits2Float(0x78787878), SkBits2Float(0x30303030)); // 2.01583e+34 f, 6.40969e-10f
8088 8088
8089 SkPath path2(path); 8089 SkPath path2(path);
8090 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); 8090 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
8091 } 8091 }
8092 8092
8093 static void fuzz763_50(skiatest::Reporter* reporter, const char* filename) {
8094 SkPath path;
8095 path.setFillType((SkPath::FillType) 1);
8096 path.moveTo(SkBits2Float(0x70621ede), SkBits2Float(0x00000000)); // 2.79924e+29 f, 0
8097 path.conicTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x 00000000), SkBits2Float(0x74fc5b97), SkBits2Float(0x7d458fe4)); // 0, 0, 0, 1.5 9951e+32f, 1.64128e+37f
8098 path.lineTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+2 9f, 0
8099 path.lineTo(SkBits2Float(0x70621ede), SkBits2Float(0x00000000)); // 2.79924e+29 f, 0
8100 path.close();
8101 path.moveTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+2 9f, 0
8102 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
8103 path.lineTo(SkBits2Float(0xefea1ffe), SkBits2Float(0x00000000)); // -1.44916e+2 9f, 0
8104 path.close();
8105
8106 SkPath path1(path);
8107 path.reset();
8108 path.setFillType((SkPath::FillType) 0);
8109
8110 SkPath path2(path);
8111 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename);
8112 }
8113
8114 static void fuzz763_51(skiatest::Reporter* reporter, const char* filename) {
8115 SkPath path;
8116 path.setFillType((SkPath::FillType) 1);
8117
8118 SkPath path1(path);
8119 path.reset();
8120 path.setFillType((SkPath::FillType) 0);
8121 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
8122 path.quadTo(SkBits2Float(0x868b5aae), SkBits2Float(0x626c45ab), SkBits2Float(0xe fea1ffe), SkBits2Float(0x0029fc76)); // -5.24192e-35f, 1.08961e+21f, -1.44916e+ 29f, 3.85582e-39f
8123 path.moveTo(SkBits2Float(0xfacbff01), SkBits2Float(0x56fc5b97)); // -5.29604e+3 5f, 1.38735e+14f
8124 path.cubicTo(SkBits2Float(0x7d4559c9), SkBits2Float(0xad801c39), SkBits2Float(0x fbe2091a), SkBits2Float(0x7268e394), SkBits2Float(0x7c800079), SkBits2Float(0xa1 d75590)); // 1.63953e+37f, -1.45644e-11f, -2.34729e+36f, 4.61284e+30f, 5.31699e +36f, -1.45916e-18f
8125
8126 SkPath path2(path);
8127 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
8128 }
8129
8130 static void fuzz763_52(skiatest::Reporter* reporter, const char* filename) {
8131 SkPath path;
8132 path.setFillType((SkPath::FillType) 1);
8133
8134 SkPath path1(path);
8135 path.reset();
8136 path.setFillType((SkPath::FillType) 0);
8137 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
8138 path.quadTo(SkBits2Float(0x29ff4bae), SkBits2Float(0xa1d75590), SkBits2Float(0x9 fd6f6c3), SkBits2Float(0x70621ede)); // 1.13374e-13f, -1.45916e-18f, -9.10408e- 20f, 2.79924e+29f
8139 path.quadTo(SkBits2Float(0x57a839d3), SkBits2Float(0x1a80d34b), SkBits2Float(0x0 147a31b), SkBits2Float(0xff7fffff)); // 3.69933e+14f, 5.32809e-23f, 3.66675e-38 f, -3.40282e+38f
8140 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
8141 path.close();
8142 path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23 f, -2.54344e-26f
8143 path.conicTo(SkBits2Float(0x75757568), SkBits2Float(0x7575755e), SkBits2Float(0x 75757575), SkBits2Float(0x75757575), SkBits2Float(0x75756575)); // 3.11156e+32f , 3.11156e+32f, 3.11156e+32f, 3.11156e+32f, 3.11077e+32f
8144 path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23 f, -2.54344e-26f
8145 path.close();
8146 path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23 f, -2.54344e-26f
8147 path.conicTo(SkBits2Float(0x75757575), SkBits2Float(0x75757575), SkBits2Float(0x 75757575), SkBits2Float(0x75917575), SkBits2Float(0x75757575)); // 3.11156e+32f , 3.11156e+32f, 3.11156e+32f, 3.68782e+32f, 3.11156e+32f
8148 path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23 f, -2.54344e-26f
8149 path.close();
8150 path.moveTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23 f, -2.54344e-26f
8151 path.conicTo(SkBits2Float(0x75757575), SkBits2Float(0x7575758f), SkBits2Float(0x 7f757575), SkBits2Float(0x75757575), SkBits2Float(0x75757575)); // 3.11156e+32f , 3.11157e+32f, 3.26271e+38f, 3.11156e+32f, 3.11156e+32f
8152 path.lineTo(SkBits2Float(0x1ab8e97c), SkBits2Float(0x94fbe3ef)); // 7.64778e-23 f, -2.54344e-26f
8153 path.close();
8154
8155 SkPath path2(path);
8156 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 2, filename);
8157 }
8158
8093 static struct TestDesc failTests[] = { 8159 static struct TestDesc failTests[] = {
8160 TEST(fuzz763_52),
8161 TEST(fuzz763_51),
8162 TEST(fuzz763_50),
8094 TEST(fuzz763_49), 8163 TEST(fuzz763_49),
8095 TEST(fuzz763_48), 8164 TEST(fuzz763_48),
8096 TEST(fuzz763_47), 8165 TEST(fuzz763_47),
8097 TEST(fuzz763_46), 8166 TEST(fuzz763_46),
8098 TEST(fuzz763_45), 8167 TEST(fuzz763_45),
8099 TEST(fuzz763_44), 8168 TEST(fuzz763_44),
8100 TEST(fuzz763_43), 8169 TEST(fuzz763_43),
8101 TEST(fuzz763_42), 8170 TEST(fuzz763_42),
8102 TEST(fuzz763_41), 8171 TEST(fuzz763_41),
8103 TEST(fuzz763_40), 8172 TEST(fuzz763_40),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
8171 } 8240 }
8172 8241
8173 static struct TestDesc repTests[] = { 8242 static struct TestDesc repTests[] = {
8174 TEST(fuzz763_5a), 8243 TEST(fuzz763_5a),
8175 }; 8244 };
8176 8245
8177 DEF_TEST(PathOpsRepOp, reporter) { 8246 DEF_TEST(PathOpsRepOp, reporter) {
8178 for (int index = 0; index < 1; ++index) 8247 for (int index = 0; index < 1; ++index)
8179 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false); 8248 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false);
8180 } 8249 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698