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

Side by Side Diff: tests/PathTest.cpp

Issue 89123002: Move fIsOval from SkPath to SkPathRef (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated to add backwards compatibility from v16 to v15 Created 7 years 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 | « src/core/SkPicture.cpp ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 7
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 } 2470 }
2471 REPORTER_ASSERT(reporter, numIterPts == numPoints); 2471 REPORTER_ASSERT(reporter, numIterPts == numPoints);
2472 REPORTER_ASSERT(reporter, numIterVerbs == numVerbs); 2472 REPORTER_ASSERT(reporter, numIterVerbs == numVerbs);
2473 } 2473 }
2474 } 2474 }
2475 2475
2476 static void check_for_circle(skiatest::Reporter* reporter, 2476 static void check_for_circle(skiatest::Reporter* reporter,
2477 const SkPath& path, 2477 const SkPath& path,
2478 bool expectedCircle, 2478 bool expectedCircle,
2479 SkPath::Direction expectedDir) { 2479 SkPath::Direction expectedDir) {
2480 SkRect rect; 2480 SkRect rect = SkRect::MakeEmpty();
2481 REPORTER_ASSERT(reporter, path.isOval(&rect) == expectedCircle); 2481 REPORTER_ASSERT(reporter, path.isOval(&rect) == expectedCircle);
2482 REPORTER_ASSERT(reporter, path.cheapIsDirection(expectedDir)); 2482 REPORTER_ASSERT(reporter, path.cheapIsDirection(expectedDir));
2483 2483
2484 if (expectedCircle) { 2484 if (expectedCircle) {
2485 REPORTER_ASSERT(reporter, rect.height() == rect.width()); 2485 REPORTER_ASSERT(reporter, rect.height() == rect.width());
2486 } 2486 }
2487 } 2487 }
2488 2488
2489 static void test_circle_skew(skiatest::Reporter* reporter, 2489 static void test_circle_skew(skiatest::Reporter* reporter,
2490 const SkPath& path, 2490 const SkPath& path,
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
3251 test_arcTo(reporter); 3251 test_arcTo(reporter);
3252 test_addPath(reporter); 3252 test_addPath(reporter);
3253 test_conicTo_special_case(reporter); 3253 test_conicTo_special_case(reporter);
3254 test_get_point(reporter); 3254 test_get_point(reporter);
3255 test_contains(reporter); 3255 test_contains(reporter);
3256 PathTest_Private::TestPathTo(reporter); 3256 PathTest_Private::TestPathTo(reporter);
3257 } 3257 }
3258 3258
3259 #include "TestClassDef.h" 3259 #include "TestClassDef.h"
3260 DEFINE_TESTCLASS("Path", PathTestClass, TestPath) 3260 DEFINE_TESTCLASS("Path", PathTestClass, TestPath)
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698