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

Side by Side Diff: tests/PathOpsCubicToQuadsTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsCubicReduceOrderTest.cpp ('k') | tests/PathOpsDCubicTest.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 "PathOpsQuadIntersectionTestData.h" 8 #include "PathOpsQuadIntersectionTestData.h"
9 #include "PathOpsTestCommon.h" 9 #include "PathOpsTestCommon.h"
10 #include "SkGeometry.h" 10 #include "SkGeometry.h"
11 #include "SkIntersections.h" 11 #include "SkIntersections.h"
12 #include "SkPathOpsRect.h" 12 #include "SkPathOpsRect.h"
13 #include "SkReduceOrder.h" 13 #include "SkReduceOrder.h"
14 #include "Test.h" 14 #include "Test.h"
15 #include "TestClassDef.h"
16 15
17 static void test(skiatest::Reporter* reporter, const SkDCubic* cubics, const cha r* name, 16 static void test(skiatest::Reporter* reporter, const SkDCubic* cubics, const cha r* name,
18 int firstTest, size_t testCount) { 17 int firstTest, size_t testCount) {
19 for (size_t index = firstTest; index < testCount; ++index) { 18 for (size_t index = firstTest; index < testCount; ++index) {
20 const SkDCubic& cubic = cubics[index]; 19 const SkDCubic& cubic = cubics[index];
21 SkASSERT(ValidCubic(cubic)); 20 SkASSERT(ValidCubic(cubic));
22 double precision = cubic.calcPrecision(); 21 double precision = cubic.calcPrecision();
23 SkTArray<SkDQuad, true> quads; 22 SkTArray<SkDQuad, true> quads;
24 CubicToQuads(cubic, precision, quads); 23 CubicToQuads(cubic, precision, quads);
25 if (quads.count() != 1 && quads.count() != 2) { 24 if (quads.count() != 1 && quads.count() != 2) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 189
191 DEF_TEST(CubicsToQuadratics_OneOff_Loop, reporter) { 190 DEF_TEST(CubicsToQuadratics_OneOff_Loop, reporter) {
192 for (size_t x = 0; x < localsCount; ++x) { 191 for (size_t x = 0; x < localsCount; ++x) {
193 oneOff(reporter, x); 192 oneOff(reporter, x);
194 } 193 }
195 } 194 }
196 195
197 DEF_TEST(CubicsToQuadratics_OneOff_Single, reporter) { 196 DEF_TEST(CubicsToQuadratics_OneOff_Single, reporter) {
198 oneOff(reporter, 0); 197 oneOff(reporter, 0);
199 } 198 }
OLDNEW
« no previous file with comments | « tests/PathOpsCubicReduceOrderTest.cpp ('k') | tests/PathOpsDCubicTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698