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

Side by Side Diff: tests/PathOpsDPointTest.cpp

Issue 1002693002: pathops version two (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix arm 64 inspired coincident handling Created 5 years, 9 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/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 10
(...skipping 20 matching lines...) Expand all
31 p += v; 31 p += v;
32 REPORTER_ASSERT(reporter, p == pt); 32 REPORTER_ASSERT(reporter, p == pt);
33 p -= v; 33 p -= v;
34 REPORTER_ASSERT(reporter, p == pt); 34 REPORTER_ASSERT(reporter, p == pt);
35 REPORTER_ASSERT(reporter, p.approximatelyEqual(pt)); 35 REPORTER_ASSERT(reporter, p.approximatelyEqual(pt));
36 SkPoint sPt = pt.asSkPoint(); 36 SkPoint sPt = pt.asSkPoint();
37 p.set(sPt); 37 p.set(sPt);
38 REPORTER_ASSERT(reporter, p == pt); 38 REPORTER_ASSERT(reporter, p == pt);
39 REPORTER_ASSERT(reporter, p.approximatelyEqual(sPt)); 39 REPORTER_ASSERT(reporter, p.approximatelyEqual(sPt));
40 REPORTER_ASSERT(reporter, p.roughlyEqual(pt)); 40 REPORTER_ASSERT(reporter, p.roughlyEqual(pt));
41 REPORTER_ASSERT(reporter, p.moreRoughlyEqual(pt));
42 p.fX = p.fY = 0; 41 p.fX = p.fY = 0;
43 REPORTER_ASSERT(reporter, p.fX == 0 && p.fY == 0); 42 REPORTER_ASSERT(reporter, p.fX == 0 && p.fY == 0);
44 REPORTER_ASSERT(reporter, p.approximatelyZero()); 43 REPORTER_ASSERT(reporter, p.approximatelyZero());
45 REPORTER_ASSERT(reporter, pt.distanceSquared(p) == pt.fX * pt.fX + pt.fY * pt.fY); 44 REPORTER_ASSERT(reporter, pt.distanceSquared(p) == pt.fX * pt.fX + pt.fY * pt.fY);
46 REPORTER_ASSERT(reporter, approximately_equal(pt.distance(p), 45 REPORTER_ASSERT(reporter, approximately_equal(pt.distance(p),
47 sqrt(pt.fX * pt.fX + pt.fY * pt.fY))); 46 sqrt(pt.fX * pt.fX + pt.fY * pt.fY)));
48 } 47 }
49 } 48 }
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