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

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 2169983002: let line/cubic intersect at four spots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove the right unneeded test 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/SkDCubicLineIntersection.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 6482 matching lines...) Expand 10 before | Expand all | Expand 10 after
6493 path.quadTo(SkBits2Float(0x2d28282a), SkBits2Float(0x5568295b), SkBits2Float(0x3 a21df68), SkBits2Float(0x4f9a3a8a)); // 9.55861e-12f, 1.5954e+13f, 0.000617495f , 5.17506e+09f 6493 path.quadTo(SkBits2Float(0x2d28282a), SkBits2Float(0x5568295b), SkBits2Float(0x3 a21df68), SkBits2Float(0x4f9a3a8a)); // 9.55861e-12f, 1.5954e+13f, 0.000617495f , 5.17506e+09f
6494 path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f , 6.14991e+25f 6494 path.lineTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f , 6.14991e+25f
6495 path.close(); 6495 path.close();
6496 path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f , 6.14991e+25f 6496 path.moveTo(SkBits2Float(0x0321081f), SkBits2Float(0x6a4b7bc0)); // 4.7323e-37f , 6.14991e+25f
6497 path.cubicTo(SkBits2Float(0x5568c23a), SkBits2Float(0x5b2d2968), SkBits2Float(0x 212a8c55), SkBits2Float(0x21081f2a), SkBits2Float(0x3a7bc003), SkBits2Float(0x29 4b2827)); // 1.59951e+13f, 4.87407e+16f, 5.7784e-19f, 4.61198e-19f, 0.00096035f , 4.51099e-14f 6497 path.cubicTo(SkBits2Float(0x5568c23a), SkBits2Float(0x5b2d2968), SkBits2Float(0x 212a8c55), SkBits2Float(0x21081f2a), SkBits2Float(0x3a7bc003), SkBits2Float(0x29 4b2827)); // 1.59951e+13f, 4.87407e+16f, 5.7784e-19f, 4.61198e-19f, 0.00096035f , 4.51099e-14f
6498 6498
6499 SkPath path2(path); 6499 SkPath path2(path);
6500 testPathOpFail(reporter, path1, path2, (SkPathOp) 0, filename); 6500 testPathOpFail(reporter, path1, path2, (SkPathOp) 0, filename);
6501 } 6501 }
6502 6502
6503 static void kfuzz2(skiatest::Reporter* reporter, const char* filename) {
6504 SkPath path1;
6505 SkPath path;
6506 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268 e+35f
6507 path.close();
6508 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268 e+35f
6509 path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xf19e92c7), SkBits2Float(0x f17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0x60600100), SkBits2Float(0x01 00ff60)); // -2.36118e+21f, -1.57043e+30f, -1.26726e+30f, -3.40177e+38f, 6.4564 7e+19f, 2.36931e-38f
6510 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268 e+35f
6511 path.close();
6512 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268 e+35f
6513 path.lineTo(SkBits2Float(0x60601a1d), SkBits2Float(0x60606060)); // 6.4593e+19f , 6.46721e+19f
6514 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0xfafadbfa)); // 0, -6.51268 e+35f
6515 path.close();
6516 path.moveTo(SkBits2Float(0xe5e2f300), SkBits2Float(0xee244a40)); // -1.33967e+2 3f, -1.27113e+28f
6517 path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6518 path.close();
6519 path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6520 path.lineTo(SkBits2Float(0xfafafafa), SkBits2Float(0xe30000fa)); // -6.51582e+3 5f, -2.36125e+21f
6521 path.conicTo(SkBits2Float(0x92e592e5), SkBits2Float(0xfafafafb), SkBits2Float(0x c4fa0000), SkBits2Float(0x6060fafa), SkBits2Float(0x60606060)); // -1.44881e-27 f, -6.51582e+35f, -2000, 6.48462e+19f, 6.46721e+19f
6522 path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6523 path.close();
6524 path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6525 path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xf19e92c7), SkBits2Float(0x f17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0xfafafa00), SkBits2Float(0xfa fafafa)); // -2.36118e+21f, -1.57043e+30f, -1.26726e+30f, -3.40177e+38f, -6.515 72e+35f, -6.51582e+35f
6526 path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6527 path.close();
6528 path.moveTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6529 path.cubicTo(SkBits2Float(0xe3000000), SkBits2Float(0xe39e92c7), SkBits2Float(0x f17febcb), SkBits2Float(0xff7febcb), SkBits2Float(0xeed0ee9a), SkBits2Float(0x9a 98ffca)); // -2.36118e+21f, -5.85032e+21f, -1.26726e+30f, -3.40177e+38f, -3.233 07e+28f, -6.3279e-23f
6530 path.lineTo(SkBits2Float(0xba98ffee), SkBits2Float(0xfafafa1a)); // -0.0011673f , -6.51573e+35f
6531 path.close();
6532 SkPath path2(path);
6533 testPathOpFail(reporter, path1, path2, kXOR_SkPathOp, filename);
6534 }
6535
6503 static struct TestDesc failTests[] = { 6536 static struct TestDesc failTests[] = {
6537 TEST(kfuzz2),
6504 TEST(fuzz763_7), 6538 TEST(fuzz763_7),
6505 TEST(fuzz763_6), 6539 TEST(fuzz763_6),
6506 TEST(fuzz763_2c), 6540 TEST(fuzz763_2c),
6507 TEST(fuzz763_2b), 6541 TEST(fuzz763_2b),
6508 TEST(fuzz763_2a), 6542 TEST(fuzz763_2a),
6509 TEST(fuzz763_5a), 6543 TEST(fuzz763_5a),
6510 TEST(fuzz763_3a), 6544 TEST(fuzz763_3a),
6511 TEST(fuzz763_1a), 6545 TEST(fuzz763_1a),
6512 TEST(fuzz763_1b), 6546 TEST(fuzz763_1b),
6513 TEST(fuzz763_1c), 6547 TEST(fuzz763_1c),
(...skipping 28 matching lines...) Expand all
6542 static struct TestDesc repTests[] = { 6576 static struct TestDesc repTests[] = {
6543 TEST(loops44i), 6577 TEST(loops44i),
6544 TEST(loops45i), 6578 TEST(loops45i),
6545 TEST(loops46i), 6579 TEST(loops46i),
6546 }; 6580 };
6547 6581
6548 DEF_TEST(PathOpsRepOp, reporter) { 6582 DEF_TEST(PathOpsRepOp, reporter) {
6549 for (int index = 0; index < 2; ++index) 6583 for (int index = 0; index < 2; ++index)
6550 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false); 6584 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false);
6551 } 6585 }
OLDNEW
« no previous file with comments | « src/pathops/SkDCubicLineIntersection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698