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

Side by Side Diff: tests/PathOpsCubicIntersectionTest.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 years, 3 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 | « tests/PathOpsAngleTest.cpp ('k') | tests/PathOpsExtendedTest.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"
11 #include "SkPathOpsRect.h" 11 #include "SkPathOpsRect.h"
12 #include "SkReduceOrder.h" 12 #include "SkReduceOrder.h"
13 #include "Test.h" 13 #include "Test.h"
14 14
15 #include <stdlib.h>
16
15 const int firstCubicIntersectionTest = 9; 17 const int firstCubicIntersectionTest = 9;
16 18
17 static void standardTestCases(skiatest::Reporter* reporter) { 19 static void standardTestCases(skiatest::Reporter* reporter) {
18 for (size_t index = firstCubicIntersectionTest; index < tests_count; ++index ) { 20 for (size_t index = firstCubicIntersectionTest; index < tests_count; ++index ) {
19 int iIndex = static_cast<int>(index); 21 int iIndex = static_cast<int>(index);
20 const SkDCubic& cubic1 = tests[index][0]; 22 const SkDCubic& cubic1 = tests[index][0];
21 const SkDCubic& cubic2 = tests[index][1]; 23 const SkDCubic& cubic2 = tests[index][1];
22 SkReduceOrder reduce1, reduce2; 24 SkReduceOrder reduce1, reduce2;
23 int order1 = reduce1.reduce(cubic1, SkReduceOrder::kNo_Quadratics); 25 int order1 = reduce1.reduce(cubic1, SkReduceOrder::kNo_Quadratics);
24 int order2 = reduce2.reduce(cubic2, SkReduceOrder::kNo_Quadratics); 26 int order2 = reduce2.reduce(cubic2, SkReduceOrder::kNo_Quadratics);
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 } 696 }
695 697
696 DEF_TEST(PathOpsCubicIntersection, reporter) { 698 DEF_TEST(PathOpsCubicIntersection, reporter) {
697 oneOffTests(reporter); 699 oneOffTests(reporter);
698 cubicIntersectionSelfTest(reporter); 700 cubicIntersectionSelfTest(reporter);
699 cubicIntersectionCoinTest(reporter); 701 cubicIntersectionCoinTest(reporter);
700 standardTestCases(reporter); 702 standardTestCases(reporter);
701 if (false) CubicIntersection_IntersectionFinder(); 703 if (false) CubicIntersection_IntersectionFinder();
702 if (false) CubicIntersection_RandTest(reporter); 704 if (false) CubicIntersection_RandTest(reporter);
703 } 705 }
OLDNEW
« no previous file with comments | « tests/PathOpsAngleTest.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698