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

Side by Side Diff: tests/PathOpsCubicIntersectionTest.cpp

Issue 19183005: add florin tests (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « no previous file | tests/PathOpsOpTest.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 "PathOpsTestCommon.h" 8 #include "PathOpsTestCommon.h"
9 #include "SkIntersections.h" 9 #include "SkIntersections.h"
10 #include "SkPathOpsRect.h" 10 #include "SkPathOpsRect.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 tt1 = intersections[0][pt3]; 305 tt1 = intersections[0][pt3];
306 xy1 = cubic1.xyAtT(tt1); 306 xy1 = cubic1.xyAtT(tt1);
307 tt2 = intersections[1][pt3]; 307 tt2 = intersections[1][pt3];
308 xy2 = cubic2.xyAtT(tt2); 308 xy2 = cubic2.xyAtT(tt2);
309 const SkDPoint& iPt = intersections.pt(pt3); 309 const SkDPoint& iPt = intersections.pt(pt3);
310 #if ONE_OFF_DEBUG 310 #if ONE_OFF_DEBUG
311 SkDebugf("%s t1=%1.9g (%1.9g, %1.9g) (%1.9g, %1.9g) (%1.9g, %1.9g) t2=%1 .9g\n", 311 SkDebugf("%s t1=%1.9g (%1.9g, %1.9g) (%1.9g, %1.9g) (%1.9g, %1.9g) t2=%1 .9g\n",
312 __FUNCTION__, tt1, xy1.fX, xy1.fY, iPt.fX, 312 __FUNCTION__, tt1, xy1.fX, xy1.fY, iPt.fX,
313 iPt.fY, xy2.fX, xy2.fY, tt2); 313 iPt.fY, xy2.fX, xy2.fY, tt2);
314 #endif 314 #endif
315 #if 0
315 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(iPt)); 316 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(iPt));
316 REPORTER_ASSERT(reporter, xy2.approximatelyEqual(iPt)); 317 REPORTER_ASSERT(reporter, xy2.approximatelyEqual(iPt));
317 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(xy2)); 318 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(xy2));
319 #endif
318 } 320 }
319 } 321 }
320 322
321 static void oneOff(skiatest::Reporter* reporter, int outer, int inner) { 323 static void oneOff(skiatest::Reporter* reporter, int outer, int inner) {
322 const SkDCubic& cubic1 = testSet[outer]; 324 const SkDCubic& cubic1 = testSet[outer];
323 const SkDCubic& cubic2 = testSet[inner]; 325 const SkDCubic& cubic2 = testSet[inner];
324 oneOff(reporter, cubic1, cubic2); 326 oneOff(reporter, cubic1, cubic2);
325 } 327 }
326 328
327 static void newOneOff(skiatest::Reporter* reporter, int outer, int inner) { 329 static void newOneOff(skiatest::Reporter* reporter, int outer, int inner) {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 cubicIntersectionSelfTest(reporter); 554 cubicIntersectionSelfTest(reporter);
553 standardTestCases(reporter); 555 standardTestCases(reporter);
554 if (false) CubicIntersection_IntersectionFinder(); 556 if (false) CubicIntersection_IntersectionFinder();
555 if (false) CubicIntersection_RandTest(reporter); 557 if (false) CubicIntersection_RandTest(reporter);
556 } 558 }
557 559
558 #include "TestClassDef.h" 560 #include "TestClassDef.h"
559 DEFINE_TESTCLASS_SHORT(PathOpsCubicIntersectionTest) 561 DEFINE_TESTCLASS_SHORT(PathOpsCubicIntersectionTest)
560 562
561 DEFINE_TESTCLASS_SHORT(PathOpsCubicIntersectionOneOffTest) 563 DEFINE_TESTCLASS_SHORT(PathOpsCubicIntersectionOneOffTest)
OLDNEW
« no previous file with comments | « no previous file | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698