OLD | NEW |
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 path.quadTo(SkBits2Float(0xb6e9e93a), SkBits2Float(0x375837ff), SkBits2Float(0xc
eb6b6b6), SkBits2Float(0x0039e94f)); // -6.97109e-06f, 1.28876e-05f, -1.53271e+
09f, 5.31832e-39f | 147 path.quadTo(SkBits2Float(0xb6e9e93a), SkBits2Float(0x375837ff), SkBits2Float(0xc
eb6b6b6), SkBits2Float(0x0039e94f)); // -6.97109e-06f, 1.28876e-05f, -1.53271e+
09f, 5.31832e-39f |
148 path.quadTo(SkBits2Float(0xe9e9e9e9), SkBits2Float(0xe9e6e9e9), SkBits2Float(0xb
6b641b6), SkBits2Float(0xede9e9e9)); // -3.5348e+25f, -3.48947e+25f, -5.43167e-
06f, -9.0491e+27f | 148 path.quadTo(SkBits2Float(0xe9e9e9e9), SkBits2Float(0xe9e6e9e9), SkBits2Float(0xb
6b641b6), SkBits2Float(0xede9e9e9)); // -3.5348e+25f, -3.48947e+25f, -5.43167e-
06f, -9.0491e+27f |
149 path.moveTo(SkBits2Float(0xb6b6e9e9), SkBits2Float(0xb6b60000)); // -5.45125e-0
6f, -5.42402e-06f | 149 path.moveTo(SkBits2Float(0xb6b6e9e9), SkBits2Float(0xb6b60000)); // -5.45125e-0
6f, -5.42402e-06f |
150 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2
5f, -2.76122e+25f | 150 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2
5f, -2.76122e+25f |
151 path.close(); | 151 path.close(); |
152 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2
5f, -2.76122e+25f | 152 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2
5f, -2.76122e+25f |
153 path.quadTo(SkBits2Float(0xe93ae9e9), SkBits2Float(0xe964b6e9), SkBits2Float(0x0
000203a), SkBits2Float(0xb6000000)); // -1.41228e+25f, -1.72812e+25f, 1.15607e-
41f, -1.90735e-06f | 153 path.quadTo(SkBits2Float(0xe93ae9e9), SkBits2Float(0xe964b6e9), SkBits2Float(0x0
000203a), SkBits2Float(0xb6000000)); // -1.41228e+25f, -1.72812e+25f, 1.15607e-
41f, -1.90735e-06f |
154 path.moveTo(SkBits2Float(0x64b6b6b6), SkBits2Float(0xe9e9e900)); // 2.69638e+22
f, -3.53475e+25f | 154 path.moveTo(SkBits2Float(0x64b6b6b6), SkBits2Float(0xe9e9e900)); // 2.69638e+22
f, -3.53475e+25f |
155 path.quadTo(SkBits2Float(0xb6b6b6e9), SkBits2Float(0xb6b6b6b6), SkBits2Float(0xe
9e9b6ce), SkBits2Float(0xe9e93ae9)); // -5.44532e-06f, -5.44529e-06f, -3.53179e
+25f, -3.52447e+25f | 155 path.quadTo(SkBits2Float(0xb6b6b6e9), SkBits2Float(0xb6b6b6b6), SkBits2Float(0xe
9e9b6ce), SkBits2Float(0xe9e93ae9)); // -5.44532e-06f, -5.44529e-06f, -3.53179e
+25f, -3.52447e+25f |
156 | 156 |
157 testSimplify(reporter, path, filename); | 157 testSimplifyFuzz(reporter, path, filename); |
158 } | 158 } |
159 | 159 |
160 | 160 |
161 #define TEST(test) test(reporter, #test) | 161 #define TEST(test) test(reporter, #test) |
162 | 162 |
163 DEF_TEST(PathOpsSimplifyFail, reporter) { | 163 DEF_TEST(PathOpsSimplifyFail, reporter) { |
164 TEST(fuzz763_1), | 164 TEST(fuzz763_1), |
165 TEST(fuzz_x2); | 165 TEST(fuzz_x2); |
166 TEST(fuzz_x1); | 166 TEST(fuzz_x1); |
167 TEST(fuzz_59); | 167 TEST(fuzz_59); |
168 for (int index = 0; index < (int) (13 * nonFinitePtsCount * finitePtsCount);
++index) { | 168 for (int index = 0; index < (int) (13 * nonFinitePtsCount * finitePtsCount);
++index) { |
169 failOne(reporter, index); | 169 failOne(reporter, index); |
170 } | 170 } |
171 for (int index = 0; index < (int) (11 * finitePtsCount); ++index) { | 171 for (int index = 0; index < (int) (11 * finitePtsCount); ++index) { |
172 dontFailOne(reporter, index); | 172 dontFailOne(reporter, index); |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 #undef TEST | 176 #undef TEST |
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 } |
OLD | NEW |