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

Side by Side Diff: tests/PathOpsQuadParameterizationTest.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/PathOpsQuadLineIntersectionThreadedTest.cpp ('k') | tests/PathOpsQuadReduceOrderTest.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 "SkDQuadImplicit.h" 7 #include "SkDQuadImplicit.h"
8 #include "SkPathOpsQuad.h" 8 #include "SkPathOpsQuad.h"
9 #include "Test.h" 9 #include "Test.h"
10 #include "TestClassDef.h"
11 10
12 static bool point_on_parameterized_curve(const SkDQuad& quad, const SkDPoint& po int) { 11 static bool point_on_parameterized_curve(const SkDQuad& quad, const SkDPoint& po int) {
13 SkDQuadImplicit q(quad); 12 SkDQuadImplicit q(quad);
14 double xx = q.x2() * point.fX * point.fX; 13 double xx = q.x2() * point.fX * point.fX;
15 double xy = q.xy() * point.fX * point.fY; 14 double xy = q.xy() * point.fX * point.fY;
16 double yy = q.y2() * point.fY * point.fY; 15 double yy = q.y2() * point.fY * point.fY;
17 double x = q.x() * point.fX; 16 double x = q.x() * point.fX;
18 double y = q.y() * point.fY; 17 double y = q.y() * point.fY;
19 double c = q.c(); 18 double c = q.c();
20 double sum = xx + xy + yy + x + y + c; 19 double sum = xx + xy + yy + x + y + c;
(...skipping 21 matching lines...) Expand all
42 for (size_t two = 0; two < quadsCount; ++two) { 41 for (size_t two = 0; two < quadsCount; ++two) {
43 for (size_t inner = 0; inner < 3; inner += 2) { 42 for (size_t inner = 0; inner < 3; inner += 2) {
44 REPORTER_ASSERT(reporter, point_on_parameterized_curve(*qua ds[one], 43 REPORTER_ASSERT(reporter, point_on_parameterized_curve(*qua ds[one],
45 (*quads[two])[inner])); 44 (*quads[two])[inner]));
46 } 45 }
47 REPORTER_ASSERT(reporter, SkDQuadImplicit::Match(*quads[one], *q uads[two])); 46 REPORTER_ASSERT(reporter, SkDQuadImplicit::Match(*quads[one], *q uads[two]));
48 } 47 }
49 } 48 }
50 } 49 }
51 } 50 }
OLDNEW
« no previous file with comments | « tests/PathOpsQuadLineIntersectionThreadedTest.cpp ('k') | tests/PathOpsQuadReduceOrderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698