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

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 2178923002: fix fuzz (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/SkPathOpsCommon.cpp ('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 6609 matching lines...) Expand 10 before | Expand all | Expand 10 after
6620 path.moveTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24 f, 5.15884e-14f 6620 path.moveTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24 f, 5.15884e-14f
6621 path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x 5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x5b2d2729)); // -2.49282e-13 f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 4.87382e+16f 6621 path.conicTo(SkBits2Float(0xaa8c555b), SkBits2Float(0x081f2a21), SkBits2Float(0x 5b2d0321), SkBits2Float(0x68556829), SkBits2Float(0x5b2d2729)); // -2.49282e-13 f, 4.78968e-34f, 4.86986e+16f, 4.03114e+24f, 4.87382e+16f
6622 path.quadTo(SkBits2Float(0x2d685568), SkBits2Float(0x5568295b), SkBits2Float(0x2 a552d29), SkBits2Float(0x295b2d27)); // 1.32066e-11f, 1.5954e+13f, 1.89339e-13f , 4.86669e-14f 6622 path.quadTo(SkBits2Float(0x2d685568), SkBits2Float(0x5568295b), SkBits2Float(0x2 a552d29), SkBits2Float(0x295b2d27)); // 1.32066e-11f, 1.5954e+13f, 1.89339e-13f , 4.86669e-14f
6623 path.lineTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24 f, 5.15884e-14f 6623 path.lineTo(SkBits2Float(0x682d6829), SkBits2Float(0x29685555)); // 3.27556e+24 f, 5.15884e-14f
6624 path.close(); 6624 path.close();
6625 6625
6626 SkPath path2(path); 6626 SkPath path2(path);
6627 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename); 6627 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename);
6628 } 6628 }
6629 6629
6630 static void fuzz763_12(skiatest::Reporter* reporter, const char* filename) {
6631 SkPath path;
6632 path.setFillType((SkPath::FillType) 1);
6633 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
6634 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x6a29082a)); // 0, 5.10868e +25f
6635 path.conicTo(SkBits2Float(0x6a295ac3), SkBits2Float(0x61bb988e), SkBits2Float(0x 6829682d), SkBits2Float(0x5f3ba76a), SkBits2Float(0x42730a87)); // 5.11843e+25f , 4.32567e+20f, 3.20001e+24f, 1.35219e+19f, 60.7603f
6636 path.conicTo(SkBits2Float(0x67aedf99), SkBits2Float(0x00000000), SkBits2Float(0x 00000000), SkBits2Float(0x00000000), SkBits2Float(0x3f801112)); // 1.65163e+24f , 0, 0, 0, 1.00052f
6637 path.close();
6638 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
6639 path.conicTo(SkBits2Float(0x6a4b7bc0), SkBits2Float(0x00000000), SkBits2Float(0x 00000000), SkBits2Float(0x68556829), SkBits2Float(0x555b2d29)); // 6.14991e+25f , 0, 0, 4.03114e+24f, 1.50617e+13f
6640 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x68555b2a)); // 0, 4.03018e +24f
6641 path.cubicTo(SkBits2Float(0x00000000), SkBits2Float(0x67d55b2a), SkBits2Float(0x 67296a4b), SkBits2Float(0x67555b2a), SkBits2Float(0x677e1f70), SkBits2Float(0x66 d55b2a)); // 0, 2.01509e+24f, 8.00041e+23f, 1.00755e+24f, 1.20006e+24f, 5.03773 e+23f
6642 path.cubicTo(SkBits2Float(0x678f0684), SkBits2Float(0x6684f008), SkBits2Float(0x 6798f8ea), SkBits2Float(0x6625a942), SkBits2Float(0x67961914), SkBits2Float(0x65 ce709a)); // 1.35084e+24f, 3.1389e+23f, 1.44478e+24f, 1.95578e+23f, 1.41764e+24 f, 1.21861e+23f
6643 path.cubicTo(SkBits2Float(0x679158b0), SkBits2Float(0x00000000), SkBits2Float(0x 67531e34), SkBits2Float(0x00000000), SkBits2Float(0x00000000), SkBits2Float(0x00 000000)); // 1.37276e+24f, 0, 9.96976e+23f, 0, 0, 0
6644 path.close();
6645
6646 SkPath path1(path);
6647 path.reset();
6648 path.setFillType((SkPath::FillType) 0);
6649 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
6650 path.conicTo(SkBits2Float(0x21081f21), SkBits2Float(0x4b7bc003), SkBits2Float(0x ed237a6a), SkBits2Float(0x2d682967), SkBits2Float(0x2a8c555b)); // 4.61198e-19f , 1.64987e+07f, -3.16213e+27f, 1.31969e-11f, 2.49282e-13f
6651 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
6652 path.close();
6653 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
6654 path.lineTo(SkBits2Float(0x3a6821df), SkBits2Float(0x2a8c3a8a)); // 0.000885514 f, 2.49096e-13f
6655 path.moveTo(SkBits2Float(0x29272a1d), SkBits2Float(0xb03a2a55)); // 3.7118e-14f , -6.77266e-10f
6656 path.moveTo(SkBits2Float(0x20213b1e), SkBits2Float(0xc5272927)); // 1.36568e-19 f, -2674.57f
6657 path.quadTo(SkBits2Float(0xc422373b), SkBits2Float(0xec2a201f), SkBits2Float(0x2 1c25d27), SkBits2Float(0x523a7059)); // -648.863f, -8.22676e+26f, 1.31706e-18f, 2.00187e+11f
6658 path.cubicTo(SkBits2Float(0x12102a10), SkBits2Float(0xe73a28d9), SkBits2Float(0x c8092763), SkBits2Float(0x2927b029), SkBits2Float(0x295b2d27), SkBits2Float(0x2d 685568)); // 4.54902e-28f, -8.79114e+23f, -140446, 3.72342e-14f, 4.86669e-14f, 1.32066e-11f
6659 path.moveTo(SkBits2Float(0x68556809), SkBits2Float(0x555b2d29)); // 4.03113e+24 f, 1.50617e+13f
6660 path.moveTo(SkBits2Float(0x1f2a212a), SkBits2Float(0x2d032108)); // 3.60263e-20 f, 7.45382e-12f
6661 path.moveTo(SkBits2Float(0x68556829), SkBits2Float(0x2a552d29)); // 4.03114e+24 f, 1.89339e-13f
6662 path.cubicTo(SkBits2Float(0x21295b2d), SkBits2Float(0x2a528c5b), SkBits2Float(0x 284f5b2d), SkBits2Float(0x218aa621), SkBits2Float(0x3f2d2db3), SkBits2Float(0x68 293a2a)); // 5.73801e-19f, 1.87004e-13f, 1.15106e-14f, 9.39522e-19f, 0.676479f, 3.19661e+24f
6663
6664 SkPath path2(path);
6665 testPathOpFailSkipAssert(reporter, path1, path2, (SkPathOp) 0, filename);
6666 }
6667
6630 static struct TestDesc failTests[] = { 6668 static struct TestDesc failTests[] = {
6669 TEST(fuzz763_12),
6631 TEST(fuzz763_11), 6670 TEST(fuzz763_11),
6632 TEST(fuzz763_10), 6671 TEST(fuzz763_10),
6633 TEST(kfuzz2), 6672 TEST(kfuzz2),
6634 TEST(fuzz763_7), 6673 TEST(fuzz763_7),
6635 TEST(fuzz763_6), 6674 TEST(fuzz763_6),
6636 TEST(fuzz763_2c), 6675 TEST(fuzz763_2c),
6637 TEST(fuzz763_2b), 6676 TEST(fuzz763_2b),
6638 TEST(fuzz763_2a), 6677 TEST(fuzz763_2a),
6639 TEST(fuzz763_5a), 6678 TEST(fuzz763_5a),
6640 TEST(fuzz763_3a), 6679 TEST(fuzz763_3a),
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
6672 static struct TestDesc repTests[] = { 6711 static struct TestDesc repTests[] = {
6673 TEST(loops44i), 6712 TEST(loops44i),
6674 TEST(loops45i), 6713 TEST(loops45i),
6675 TEST(loops46i), 6714 TEST(loops46i),
6676 }; 6715 };
6677 6716
6678 DEF_TEST(PathOpsRepOp, reporter) { 6717 DEF_TEST(PathOpsRepOp, reporter) {
6679 for (int index = 0; index < 2; ++index) 6718 for (int index = 0; index < 2; ++index)
6680 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false); 6719 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false);
6681 } 6720 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCommon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698