OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |