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

Side by Side Diff: tests/PathOpsDPointTest.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/PathOpsDLineTest.cpp ('k') | tests/PathOpsDQuadTest.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 "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkPathOpsPoint.h" 8 #include "SkPathOpsPoint.h"
9 #include "Test.h" 9 #include "Test.h"
10 #include "TestClassDef.h"
11 10
12 static const SkDPoint tests[] = { 11 static const SkDPoint tests[] = {
13 {0, 0}, 12 {0, 0},
14 {1, 0}, 13 {1, 0},
15 {0, 1}, 14 {0, 1},
16 {2, 1}, 15 {2, 1},
17 {1, 2}, 16 {1, 2},
18 {1, 1}, 17 {1, 1},
19 {2, 2} 18 {2, 2}
20 }; 19 };
(...skipping 20 matching lines...) Expand all
41 REPORTER_ASSERT(reporter, p.roughlyEqual(pt)); 40 REPORTER_ASSERT(reporter, p.roughlyEqual(pt));
42 REPORTER_ASSERT(reporter, p.moreRoughlyEqual(pt)); 41 REPORTER_ASSERT(reporter, p.moreRoughlyEqual(pt));
43 p.fX = p.fY = 0; 42 p.fX = p.fY = 0;
44 REPORTER_ASSERT(reporter, p.fX == 0 && p.fY == 0); 43 REPORTER_ASSERT(reporter, p.fX == 0 && p.fY == 0);
45 REPORTER_ASSERT(reporter, p.approximatelyZero()); 44 REPORTER_ASSERT(reporter, p.approximatelyZero());
46 REPORTER_ASSERT(reporter, pt.distanceSquared(p) == pt.fX * pt.fX + pt.fY * pt.fY); 45 REPORTER_ASSERT(reporter, pt.distanceSquared(p) == pt.fX * pt.fX + pt.fY * pt.fY);
47 REPORTER_ASSERT(reporter, approximately_equal(pt.distance(p), 46 REPORTER_ASSERT(reporter, approximately_equal(pt.distance(p),
48 sqrt(pt.fX * pt.fX + pt.fY * pt.fY))); 47 sqrt(pt.fX * pt.fX + pt.fY * pt.fY)));
49 } 48 }
50 } 49 }
OLDNEW
« no previous file with comments | « tests/PathOpsDLineTest.cpp ('k') | tests/PathOpsDQuadTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698