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 7261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7272 path.close(); | 7272 path.close(); |
7273 path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24
f, -2.87402e+29f | 7273 path.moveTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24
f, -2.87402e+29f |
7274 path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x1f2128c0)); // -1.31678e-3
1f, 3.41268e-20f | 7274 path.lineTo(SkBits2Float(0x8c2aed7a), SkBits2Float(0x1f2128c0)); // -1.31678e-3
1f, 3.41268e-20f |
7275 path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24
f, -2.87402e+29f | 7275 path.lineTo(SkBits2Float(0x68385b2d), SkBits2Float(0xf0682955)); // 3.48239e+24
f, -2.87402e+29f |
7276 path.close(); | 7276 path.close(); |
7277 | 7277 |
7278 SkPath path2(path); | 7278 SkPath path2(path); |
7279 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename); | 7279 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename); |
7280 } | 7280 } |
7281 | 7281 |
| 7282 static void fuzz763_28(skiatest::Reporter* reporter, const char* filename) { |
| 7283 SkPath path; |
| 7284 path.setFillType((SkPath::FillType) 0); |
| 7285 |
| 7286 SkPath path1(path); |
| 7287 path.reset(); |
| 7288 path.setFillType((SkPath::FillType) 0); |
| 7289 path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 4.03114e+24
f, 1.50617e+13f |
| 7290 path.moveTo(SkBits2Float(0x1f2a312a), SkBits2Float(0xc0032108)); // 3.60396e-20
f, -2.04889f |
| 7291 path.cubicTo(SkBits2Float(0x68302d55), SkBits2Float(0xf05b684b), SkBits2Float(0x
8c55272d), SkBits2Float(0x212a1f2a), SkBits2Float(0x0321082a), SkBits2Float(0x6a
a37bc0)); // 3.32789e+24f, -2.71613e+29f, -1.64207e-31f, 5.76395e-19f, 4.7323e-
37f, 9.88197e+25f |
| 7292 path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x
6a4b7bc0), SkBits2Float(0x2d28ed84), SkBits2Float(0x5b2d2955)); // 5.77848e-19f
, 4.7323e-37f, 6.14991e+25f, 9.60243e-12f, 4.87406e+16f |
| 7293 path.moveTo(SkBits2Float(0x6c395b2d), SkBits2Float(0xf0682955)); // 8.96327e+26
f, -2.87402e+29f |
| 7294 path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2aef8c55), SkBits2Float(0x
68295b2d), SkBits2Float(0x21086855), SkBits2Float(0x4b7bc003)); // 5.76397e-19f
, 4.25523e-13f, 3.19905e+24f, 4.62167e-19f, 1.64987e+07f |
| 7295 path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16
f, 5.7784e-19f |
| 7296 path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f
, 6.14991e+25f |
| 7297 path.lineTo(SkBits2Float(0x8a283a28), SkBits2Float(0x284f1a3a)); // -8.09984e-3
3f, 1.14965e-14f |
| 7298 path.quadTo(SkBits2Float(0x1d2a2928), SkBits2Float(0x43962be6), SkBits2Float(0x2
72a812a), SkBits2Float(0x3a2a5529)); // 2.25206e-21f, 300.343f, 2.36623e-15f, 0
.000649768f |
| 7299 path.lineTo(SkBits2Float(0x213b1e2a), SkBits2Float(0x27292720)); // 6.3398e-19f
, 2.34747e-15f |
| 7300 path.conicTo(SkBits2Float(0x381f203a), SkBits2Float(0x2ac422c5), SkBits2Float(0x
c25d27ec), SkBits2Float(0x3a705921), SkBits2Float(0x2a105152)); // 3.79386e-05f
, 3.48407e-13f, -55.289f, 0.000916855f, 1.2818e-13f |
| 7301 path.quadTo(SkBits2Float(0x633ad912), SkBits2Float(0x29c80927), SkBits2Float(0x2
72927b0), SkBits2Float(0x683a5b2d)); // 3.44674e+21f, 8.88337e-14f, 2.3475e-15f
, 3.52017e+24f |
| 7302 path.lineTo(SkBits2Float(0x295b2d68), SkBits2Float(0x29685568)); // 4.86672e-14
f, 5.15884e-14f |
| 7303 path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x
5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // -2.49282e-13
f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 1.89339e-13f |
| 7304 path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a688c5b), SkBits2Float(0x
68295b2d), SkBits2Float(0x2d296855), SkBits2Float(0x8c08555b), SkBits2Float(0x2a
2a29ca)); // 5.73801e-19f, 2.06544e-13f, 3.19905e+24f, 9.6297e-12f, -1.05027e-3
1f, 1.51135e-13f |
| 7305 path.quadTo(SkBits2Float(0x68295b21), SkBits2Float(0x2d296855), SkBits2Float(0x2
a8c555b), SkBits2Float(0x081f2a21)); // 3.19904e+24f, 9.6297e-12f, 2.49282e-13f
, 4.78968e-34f |
| 7306 path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f
, 6.14991e+25f |
| 7307 path.close(); |
| 7308 path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f
, 6.14991e+25f |
| 7309 path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x5b2d6829), SkBits2Float(0x
1f212a55), SkBits2Float(0x8ced7aba), SkBits2Float(0x3f2a212a)); // 6.14991e+25f
, 4.88097e+16f, 3.41281e-20f, -3.65895e-31f, 0.664569f |
| 7310 path.lineTo(SkBits2Float(0x5b2d212d), SkBits2Float(0x2d556829)); // 4.87316e+16
f, 1.21308e-11f |
| 7311 path.moveTo(SkBits2Float(0x68552968), SkBits2Float(0x5568295b)); // 4.02651e+24
f, 1.5954e+13f |
| 7312 path.moveTo(SkBits2Float(0x5b2d2968), SkBits2Float(0x212a8c55)); // 4.87407e+16
f, 5.7784e-19f |
| 7313 path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f
, 6.14991e+25f |
| 7314 path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x
6a3a7bc0), SkBits2Float(0x2147ed7a), SkBits2Float(0x28282a3a)); // 5.77848e-19f
, 4.7323e-37f, 5.63611e+25f, 6.77381e-19f, 9.33503e-15f |
| 7315 |
| 7316 SkPath path2(path); |
| 7317 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename); |
| 7318 } |
| 7319 |
| 7320 static void fuzz763_27(skiatest::Reporter* reporter, const char* filename) { |
| 7321 SkPath path; |
| 7322 path.setFillType((SkPath::FillType) 0); |
| 7323 |
| 7324 SkPath path1(path); |
| 7325 path.reset(); |
| 7326 path.setFillType((SkPath::FillType) 0); |
| 7327 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 7328 path.quadTo(SkBits2Float(0x30309ab8), SkBits2Float(0x305b3030), SkBits2Float(0x0
0f53030), SkBits2Float(0x3a3a0000)); // 6.42483e-10f, 7.97402e-10f, 2.2517e-38f
, 0.000709534f |
| 7329 path.quadTo(SkBits2Float(0xb8b8d5b8), SkBits2Float(0x0b0b0b03), SkBits2Float(0x0
b0b0b0b), SkBits2Float(0x3a3a0b0b)); // -8.81361e-05f, 2.67787e-32f, 2.67787e-3
2f, 0.000709698f |
| 7330 path.quadTo(SkBits2Float(0xb8b8b8b8), SkBits2Float(0x0b1203b8), SkBits2Float(0x0
b0b0b0b), SkBits2Float(0x3a3a2110)); // -8.80821e-05f, 2.81214e-32f, 2.67787e-3
2f, 0.000710026f |
| 7331 |
| 7332 SkPath path2(path); |
| 7333 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 4, filename); |
| 7334 } |
| 7335 |
7282 static struct TestDesc failTests[] = { | 7336 static struct TestDesc failTests[] = { |
| 7337 TEST(fuzz763_28), |
| 7338 TEST(fuzz763_27), |
7283 TEST(fuzz763_26), | 7339 TEST(fuzz763_26), |
7284 TEST(fuzz763_25), | 7340 TEST(fuzz763_25), |
7285 TEST(fuzz763_24), | 7341 TEST(fuzz763_24), |
7286 TEST(fuzz763_23), | 7342 TEST(fuzz763_23), |
7287 TEST(fuzz763_22), | 7343 TEST(fuzz763_22), |
7288 TEST(fuzz763_21), | 7344 TEST(fuzz763_21), |
7289 TEST(fuzz763_20), | 7345 TEST(fuzz763_20), |
7290 TEST(fuzz763_19), | 7346 TEST(fuzz763_19), |
7291 TEST(fuzz763_18), | 7347 TEST(fuzz763_18), |
7292 TEST(fuzz763_17), | 7348 TEST(fuzz763_17), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7339 static struct TestDesc repTests[] = { | 7395 static struct TestDesc repTests[] = { |
7340 TEST(loops44i), | 7396 TEST(loops44i), |
7341 TEST(loops45i), | 7397 TEST(loops45i), |
7342 TEST(loops46i), | 7398 TEST(loops46i), |
7343 }; | 7399 }; |
7344 | 7400 |
7345 DEF_TEST(PathOpsRepOp, reporter) { | 7401 DEF_TEST(PathOpsRepOp, reporter) { |
7346 for (int index = 0; index < 2; ++index) | 7402 for (int index = 0; index < 2; ++index) |
7347 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); | 7403 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); |
7348 } | 7404 } |
OLD | NEW |