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

Unified Diff: tests/EmptyPathTest.cpp

Issue 132843002: Add REPORTF test macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: final rebase Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/DataRefTest.cpp ('k') | tests/GpuBitmapCopyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/EmptyPathTest.cpp
diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index fa1fd7f489bb92decb77fff42e0d3675eb3b6450..39e36808c7e5bb91f13a927679d18cd045e11cf3 100644
--- a/tests/EmptyPathTest.cpp
+++ b/tests/EmptyPathTest.cpp
@@ -10,17 +10,6 @@
#include "SkPath.h"
#include "SkCanvas.h"
-static void appendStr(SkString* str, const SkPaint& paint) {
- str->appendf(" style[%d] cap[%d] join[%d] antialias[%d]",
- paint.getStyle(), paint.getStrokeCap(),
- paint.getStrokeJoin(), paint.isAntiAlias());
-}
-
-static void appendStr(SkString* str, const SkPath& path) {
- str->appendf(" filltype[%d] ptcount[%d]",
- path.getFillType(), path.countPoints());
-}
-
#define DIMENSION 32
static void drawAndTest(skiatest::Reporter* reporter, const SkPath& path,
@@ -52,16 +41,16 @@ static void drawAndTest(skiatest::Reporter* reporter, const SkPath& path,
bool success = shouldDraw ? (~0U == andValue) : (0 == orValue);
if (!success) {
- SkString str;
+ const char* str;
if (shouldDraw) {
- str.set("Path expected to draw everywhere, but didn't. ");
+ str = "Path expected to draw everywhere, but didn't. ";
} else {
- str.set("Path expected to draw nowhere, but did. ");
+ str = "Path expected to draw nowhere, but did. ";
}
- appendStr(&str, paint);
- appendStr(&str, path);
- reporter->reportFailed(str);
-
+ ERRORF(reporter, "%s style[%d] cap[%d] join[%d] antialias[%d]"
+ " filltype[%d] ptcount[%d]", str, paint.getStyle(),
+ paint.getStrokeCap(), paint.getStrokeJoin(),
+ paint.isAntiAlias(), path.getFillType(), path.countPoints());
// uncomment this if you want to step in to see the failure
// canvas.drawPath(path, p);
}
« no previous file with comments | « tests/DataRefTest.cpp ('k') | tests/GpuBitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698