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

Side by Side Diff: tests/PathOpsSimplifyFailTest.cpp

Issue 2237223002: pathops coincident work (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused code Created 4 years, 3 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/PathOpsOpTest.cpp ('k') | tests/PathOpsSimplifyTest.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 2013 Google Inc. 2 * Copyright 2013 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 "SkPath.h" 8 #include "SkPath.h"
9 #include "SkPathOps.h" 9 #include "SkPathOps.h"
10 #include "SkPoint.h" 10 #include "SkPoint.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 static void fuzz_59(skiatest::Reporter* reporter, const char* filename) { 97 static void fuzz_59(skiatest::Reporter* reporter, const char* filename) {
98 SkPath path; 98 SkPath path;
99 path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0xce58f41c)); // 140, -9 .09969e+08f 99 path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0xce58f41c)); // 140, -9 .09969e+08f
100 path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0xce58f419)); // 200, -9 .09969e+08f 100 path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0xce58f419)); // 200, -9 .09969e+08f
101 path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0xce58f41b)); // 40, -9. 09969e+08f 101 path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0xce58f41b)); // 40, -9. 09969e+08f
102 path.lineTo(SkBits2Float(0x43700000), SkBits2Float(0xce58f41b)); // 240, -9 .09969e+08f 102 path.lineTo(SkBits2Float(0x43700000), SkBits2Float(0xce58f41b)); // 240, -9 .09969e+08f
103 path.lineTo(SkBits2Float(0x428c0000), SkBits2Float(0xce58f419)); // 70, -9. 09969e+08f 103 path.lineTo(SkBits2Float(0x428c0000), SkBits2Float(0xce58f419)); // 70, -9. 09969e+08f
104 path.lineTo(SkBits2Float(0x430c0000), SkBits2Float(0xce58f41c)); // 140, -9 .09969e+08f 104 path.lineTo(SkBits2Float(0x430c0000), SkBits2Float(0xce58f41c)); // 140, -9 .09969e+08f
105 path.close(); 105 path.close();
106 testSimplifyCheck(reporter, path, filename, true); 106 testSimplifyFuzz(reporter, path, filename);
107 } 107 }
108 108
109 static void fuzz_x1(skiatest::Reporter* reporter, const char* filename) { 109 static void fuzz_x1(skiatest::Reporter* reporter, const char* filename) {
110 SkPath path; 110 SkPath path;
111 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 111 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
112 path.cubicTo(SkBits2Float(0x1931204a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x 4a4a08ff), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a4a34), SkBits2Float(0x4a 4a4a4a)); // 9.15721e-24f, 1.14845e-12f, 3.31014e+06f, 3.31014e+06f, 3.31432e+0 6f, 3.31432e+06f 112 path.cubicTo(SkBits2Float(0x1931204a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x 4a4a08ff), SkBits2Float(0x4a4a08ff), SkBits2Float(0x4a4a4a34), SkBits2Float(0x4a 4a4a4a)); // 9.15721e-24f, 1.14845e-12f, 3.31014e+06f, 3.31014e+06f, 3.31432e+0 6f, 3.31432e+06f
113 path.moveTo(SkBits2Float(0x000010a1), SkBits2Float(0x19312000)); // 5.96533e-42 f, 9.15715e-24f 113 path.moveTo(SkBits2Float(0x000010a1), SkBits2Float(0x19312000)); // 5.96533e-42 f, 9.15715e-24f
114 path.cubicTo(SkBits2Float(0x4a6a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x a14a4a4a), SkBits2Float(0x08ff2ba1), SkBits2Float(0x08ff4a4a), SkBits2Float(0x4a 344a4a)); // 3.83861e+06f, 3.31432e+06f, -6.85386e-19f, 1.53575e-33f, 1.53647e- 33f, 2.95387e+06f 114 path.cubicTo(SkBits2Float(0x4a6a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x a14a4a4a), SkBits2Float(0x08ff2ba1), SkBits2Float(0x08ff4a4a), SkBits2Float(0x4a 344a4a)); // 3.83861e+06f, 3.31432e+06f, -6.85386e-19f, 1.53575e-33f, 1.53647e- 33f, 2.95387e+06f
115 path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x 2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1 a181ff)); // 3.31432e+06f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+0 6f, -1.09442e-18f 115 path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x 2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1 a181ff)); // 3.31432e+06f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+0 6f, -1.09442e-18f
116 testSimplify(reporter, path, filename); 116 testSimplify(reporter, path, filename);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 DEF_TEST(PathOpsSimplifyFailOne, reporter) { 178 DEF_TEST(PathOpsSimplifyFailOne, reporter) {
179 int index = 0; 179 int index = 0;
180 failOne(reporter, index); 180 failOne(reporter, index);
181 } 181 }
182 182
183 DEF_TEST(PathOpsSimplifyDontFailOne, reporter) { 183 DEF_TEST(PathOpsSimplifyDontFailOne, reporter) {
184 int index = 17; 184 int index = 17;
185 dontFailOne(reporter, index); 185 dontFailOne(reporter, index);
186 } 186 }
OLDNEW
« no previous file with comments | « tests/PathOpsOpTest.cpp ('k') | tests/PathOpsSimplifyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698