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

Side by Side Diff: experimental/Intersection/CubicIntersection_Test.cpp

Issue 481513004: Define NDEBUG instead of SK_DEBUG/SK_RELEASE. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « bench/nanobench.cpp ('k') | experimental/Intersection/CubicUtilities.h » ('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 "CurveIntersection.h" 7 #include "CurveIntersection.h"
8 #include "CurveUtilities.h" 8 #include "CurveUtilities.h"
9 #include "CubicIntersection_TestData.h" 9 #include "CubicIntersection_TestData.h"
10 #include "Intersection_Tests.h" 10 #include "Intersection_Tests.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 xy_at_t(cubic1, tt1, xy1.x, xy1.y); 238 xy_at_t(cubic1, tt1, xy1.x, xy1.y);
239 pt2 = intersections2.fFlip ? intersections2.used() - pt1 - 1 : pt1; 239 pt2 = intersections2.fFlip ? intersections2.used() - pt1 - 1 : pt1;
240 tt2 = intersections2.fT[1][pt2]; 240 tt2 = intersections2.fT[1][pt2];
241 xy_at_t(cubic2, tt2, xy2.x, xy2.y); 241 xy_at_t(cubic2, tt2, xy2.x, xy2.y);
242 #if ONE_OFF_DEBUG 242 #if ONE_OFF_DEBUG
243 SkDebugf("%s t1=%1.9g (%1.9g, %1.9g) (%1.9g, %1.9g) (%1.9g, %1.9g) t2=%1 .9g\n", 243 SkDebugf("%s t1=%1.9g (%1.9g, %1.9g) (%1.9g, %1.9g) (%1.9g, %1.9g) t2=%1 .9g\n",
244 __FUNCTION__, tt1, xy1.x, xy1.y, intersections2.fPt[pt1].x, 244 __FUNCTION__, tt1, xy1.x, xy1.y, intersections2.fPt[pt1].x,
245 intersections2.fPt[pt1].y, xy2.x, xy2.y, tt2); 245 intersections2.fPt[pt1].y, xy2.x, xy2.y, tt2);
246 #endif 246 #endif
247 SkASSERT(xy1.approximatelyEqual(xy2)); 247 SkASSERT(xy1.approximatelyEqual(xy2));
248 #if SK_DEBUG 248 #ifdef SK_DEBUG
249 found = false; 249 found = false;
250 for (pt3 = 0; pt3 < intersections3.used(); ++pt3) { 250 for (pt3 = 0; pt3 < intersections3.used(); ++pt3) {
251 if (roughly_equal(tt1, intersections3.fT[0][pt3])) { 251 if (roughly_equal(tt1, intersections3.fT[0][pt3])) {
252 found = true; 252 found = true;
253 break; 253 break;
254 } 254 }
255 } 255 }
256 SkASSERT(found); 256 SkASSERT(found);
257 #endif 257 #endif
258 } 258 }
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 _Point pt2 = xy_at_t(cubic, i.fT[1][0]); 769 _Point pt2 = xy_at_t(cubic, i.fT[1][0]);
770 SkASSERT(pt1.approximatelyEqual(pt2)); 770 SkASSERT(pt1.approximatelyEqual(pt2));
771 } 771 }
772 } 772 }
773 773
774 void CubicIntersection_Test() { 774 void CubicIntersection_Test() {
775 oneOffTests(); 775 oneOffTests();
776 coincidentTest(); 776 coincidentTest();
777 standardTestCases(); 777 standardTestCases();
778 } 778 }
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | experimental/Intersection/CubicUtilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698