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

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 2018513003: fix security bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove extra spaces Created 4 years, 7 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 | « tests/PathOpsOpLoopThreadedTest.cpp ('k') | tests/PathOpsSimplifyQuadThreadedTest.cpp » ('j') | 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 5173 matching lines...) Expand 10 before | Expand all | Expand 10 after
5184 path.lineTo(SkBits2Float(0x45d5c000), SkBits2Float(0x43870000)); // 6840, 270 5184 path.lineTo(SkBits2Float(0x45d5c000), SkBits2Float(0x43870000)); // 6840, 270
5185 path.lineTo(SkBits2Float(0xd0a00000), SkBits2Float(0x4cbebc20)); // -2.14748e+1 0f, 1e+08 5185 path.lineTo(SkBits2Float(0xd0a00000), SkBits2Float(0x4cbebc20)); // -2.14748e+1 0f, 1e+08
5186 path.lineTo(SkBits2Float(0x451f7000), SkBits2Float(0x42800000)); // 2551, 64 5186 path.lineTo(SkBits2Float(0x451f7000), SkBits2Float(0x42800000)); // 2551, 64
5187 path.lineTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321 5187 path.lineTo(SkBits2Float(0x42fe0000), SkBits2Float(0x43a08000)); // 127, 321
5188 path.close(); 5188 path.close();
5189 5189
5190 SkPath path2(path); 5190 SkPath path2(path);
5191 testPathOp(reporter, path1, path2, (SkPathOp) 2, filename); 5191 testPathOp(reporter, path1, path2, (SkPathOp) 2, filename);
5192 } 5192 }
5193 5193
5194 static void fuzzX_392(skiatest::Reporter* reporter, const char* filename) {
5195 SkPath path;
5196 path.setFillType(SkPath::kEvenOdd_FillType);
5197 path.moveTo(SkBits2Float(0x41e80000), SkBits2Float(0x43bde212)); // 29, 379.766 f
5198 path.lineTo(SkBits2Float(0x41e80000), SkBits2Float(0x43bdc7ef)); // 29, 379.562 f
5199 path.conicTo(SkBits2Float(0x42a5861e), SkBits2Float(0x43c61f86), SkBits2Float(0x 430b0610), SkBits2Float(0x43c61f86), SkBits2Float(0x3f7d23f3)); // 82.7619f, 39 6.246f, 139.024f, 396.246f, 0.98883f
5200 path.conicTo(SkBits2Float(0x42a58e20), SkBits2Float(0x43c61f86), SkBits2Float(0x 41e80000), SkBits2Float(0x43bde212), SkBits2Float(0x3f7d2cf5)); // 82.7776f, 39 6.246f, 29, 379.766f, 0.988967f
5201 path.close();
5202
5203 SkPath path1(path);
5204 path.setFillType(SkPath::kWinding_FillType);
5205 path.moveTo(SkBits2Float(0xc36c7bd8), SkBits2Float(0xc3a31d72)); // -236.484f, -326.23f
5206 path.lineTo(SkBits2Float(0xc367a4ae), SkBits2Float(0xc3a31d72)); // -231.643f, -326.23f
5207 path.lineTo(SkBits2Float(0x430b0610), SkBits2Float(0x43c61f86)); // 139.024f, 3 96.246f
5208 path.lineTo(SkBits2Float(0xc36c7bd8), SkBits2Float(0x43c61f86)); // -236.484f, 396.246f
5209
5210 SkPath path2(path);
5211 testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename);
5212 }
5213
5194 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; 5214 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
5195 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; 5215 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
5196 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; 5216 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
5197 5217
5198 #define TEST(name) { name, #name } 5218 #define TEST(name) { name, #name }
5199 5219
5200 static struct TestDesc tests[] = { 5220 static struct TestDesc tests[] = {
5221 TEST(fuzzX_392),
5201 TEST(crbug_526025), 5222 TEST(crbug_526025),
5202 TEST(fuzz38), 5223 TEST(fuzz38),
5203 TEST(cubics44d), 5224 TEST(cubics44d),
5204 TEST(cubics45u), 5225 TEST(cubics45u),
5205 TEST(loops61i), 5226 TEST(loops61i),
5206 TEST(loops62i), 5227 TEST(loops62i),
5207 TEST(loops63i), 5228 TEST(loops63i),
5208 TEST(loops58iAsQuads), 5229 TEST(loops58iAsQuads),
5209 TEST(cubics41d), 5230 TEST(cubics41d),
5210 TEST(loops59iasQuads), 5231 TEST(loops59iasQuads),
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
5829 }; 5850 };
5830 5851
5831 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); 5852 static const size_t failTestCount = SK_ARRAY_COUNT(failTests);
5832 5853
5833 DEF_TEST(PathOpsFailOp, reporter) { 5854 DEF_TEST(PathOpsFailOp, reporter) {
5834 #if DEBUG_SHOW_TEST_NAME 5855 #if DEBUG_SHOW_TEST_NAME
5835 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); 5856 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH);
5836 #endif 5857 #endif
5837 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa lse); 5858 RunTestSet(reporter, failTests, failTestCount, nullptr, nullptr, nullptr, fa lse);
5838 } 5859 }
OLDNEW
« no previous file with comments | « tests/PathOpsOpLoopThreadedTest.cpp ('k') | tests/PathOpsSimplifyQuadThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698