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 "SkPath.h" | 9 #include "SkPath.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 if (!success) { | 53 if (!success) { |
54 SkString str; | 54 SkString str; |
55 if (shouldDraw) { | 55 if (shouldDraw) { |
56 str.set("Path expected to draw everywhere, but didn't. "); | 56 str.set("Path expected to draw everywhere, but didn't. "); |
57 } else { | 57 } else { |
58 str.set("Path expected to draw nowhere, but did. "); | 58 str.set("Path expected to draw nowhere, but did. "); |
59 } | 59 } |
60 appendStr(&str, paint); | 60 appendStr(&str, paint); |
61 appendStr(&str, path); | 61 appendStr(&str, path); |
62 reporter->report(str.c_str(), skiatest::Reporter::kFailed); | 62 reporter->reportFailed(str); |
63 | 63 |
64 // uncomment this if you want to step in to see the failure | 64 // uncomment this if you want to step in to see the failure |
65 // canvas.drawPath(path, p); | 65 // canvas.drawPath(path, p); |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 static void iter_paint(skiatest::Reporter* reporter, const SkPath& path, bool sh
ouldDraw) { | 69 static void iter_paint(skiatest::Reporter* reporter, const SkPath& path, bool sh
ouldDraw) { |
70 static const SkPaint::Cap gCaps[] = { | 70 static const SkPaint::Cap gCaps[] = { |
71 SkPaint::kButt_Cap, | 71 SkPaint::kButt_Cap, |
72 SkPaint::kRound_Cap, | 72 SkPaint::kRound_Cap, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 } | 148 } |
149 } | 149 } |
150 | 150 |
151 static void TestEmptyPath(skiatest::Reporter* reporter) { | 151 static void TestEmptyPath(skiatest::Reporter* reporter) { |
152 test_emptydrawing(reporter); | 152 test_emptydrawing(reporter); |
153 } | 153 } |
154 | 154 |
155 #include "TestClassDef.h" | 155 #include "TestClassDef.h" |
156 DEFINE_TESTCLASS("EmptyPath", TestEmptyPathClass, TestEmptyPath) | 156 DEFINE_TESTCLASS("EmptyPath", TestEmptyPathClass, TestEmptyPath) |
OLD | NEW |