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

Side by Side Diff: tests/PathOpsCubicIntersectionTest.cpp

Issue 1288863004: fix pathops fuzz failures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix sign mismatch Created 5 years, 4 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/SkPathOpsTSect.h ('k') | tests/PathOpsOpTest.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 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 "PathOpsCubicIntersectionTestData.h" 7 #include "PathOpsCubicIntersectionTestData.h"
8 #include "PathOpsTestCommon.h" 8 #include "PathOpsTestCommon.h"
9 #include "SkGeometry.h" 9 #include "SkGeometry.h"
10 #include "SkIntersections.h" 10 #include "SkIntersections.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 } 646 }
647 647
648 static void cubicIntersectionSelfTest(skiatest::Reporter* reporter) { 648 static void cubicIntersectionSelfTest(skiatest::Reporter* reporter) {
649 int firstFail = 0; 649 int firstFail = 0;
650 for (int index = firstFail; index < selfSetCount; ++index) { 650 for (int index = firstFail; index < selfSetCount; ++index) {
651 selfOneOff(reporter, index); 651 selfOneOff(reporter, index);
652 } 652 }
653 } 653 }
654 654
655 static const SkDCubic coinSet[] = { 655 static const SkDCubic coinSet[] = {
656 {{{297.04998779296875, 43.928997039794922}, {297.04998779296875, 43.92899703 9794922},
657 {300.69699096679688, 45.391998291015625}, {306.92498779296875, 43.085998 53515625}}},
658 {{{297.04998779296875, 43.928997039794922}, {297.04998779296875, 43.92899703 9794922},
659 {300.69699096679688, 45.391998291015625}, {306.92498779296875, 43.085998 53515625}}},
660
656 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}, 661 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}},
657 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}, 662 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}},
658 663
659 {{{317, 711}, {322.52285766601562, 711}, {327, 715.4771728515625}, {327, 721 }}}, 664 {{{317, 711}, {322.52285766601562, 711}, {327, 715.4771728515625}, {327, 721 }}},
660 {{{324.07107543945312, 713.928955078125}, {324.4051513671875, 714.2630004882 8125}, 665 {{{324.07107543945312, 713.928955078125}, {324.4051513671875, 714.2630004882 8125},
661 {324.71566772460937, 714.62060546875}, {325, 714.9990234375}}}, 666 {324.71566772460937, 714.62060546875}, {325, 714.9990234375}}},
662 }; 667 };
663 668
664 static int coinSetCount = (int) SK_ARRAY_COUNT(coinSet); 669 static int coinSetCount = (int) SK_ARRAY_COUNT(coinSet);
665 670
(...skipping 23 matching lines...) Expand all
689 } 694 }
690 695
691 DEF_TEST(PathOpsCubicIntersection, reporter) { 696 DEF_TEST(PathOpsCubicIntersection, reporter) {
692 oneOffTests(reporter); 697 oneOffTests(reporter);
693 cubicIntersectionSelfTest(reporter); 698 cubicIntersectionSelfTest(reporter);
694 cubicIntersectionCoinTest(reporter); 699 cubicIntersectionCoinTest(reporter);
695 standardTestCases(reporter); 700 standardTestCases(reporter);
696 if (false) CubicIntersection_IntersectionFinder(); 701 if (false) CubicIntersection_IntersectionFinder();
697 if (false) CubicIntersection_RandTest(reporter); 702 if (false) CubicIntersection_RandTest(reporter);
698 } 703 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698