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

Unified Diff: tests/GpuBitmapCopyTest.cpp

Issue 132843002: Add REPORTF test macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: factor 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
Index: tests/GpuBitmapCopyTest.cpp
diff --git a/tests/GpuBitmapCopyTest.cpp b/tests/GpuBitmapCopyTest.cpp
index 6e1d74dd977c3f942bfd557fc6f74154fbe0db25..8730e8865d7e7372ead633c361b9ebc99fb18510 100644
--- a/tests/GpuBitmapCopyTest.cpp
+++ b/tests/GpuBitmapCopyTest.cpp
@@ -150,21 +150,19 @@ static void TestGpuBitmapCopy(skiatest::Reporter* reporter, GrContextFactory* fa
bool success = src.deepCopyTo(&dst, gPairs[j].fConfig);
bool expected = gPairs[i].fValid[j] != '0';
if (success != expected) {
- SkString str;
- str.printf("SkBitmap::deepCopyTo from %s to %s. expected %s returned %s",
- gConfigName[i], gConfigName[j], boolStr(expected),
- boolStr(success));
- reporter->reportFailed(str);
+ REPORTF(reporter,
+ ("SkBitmap::deepCopyTo from %s to %s. expected %s"
+ " returned %s", gConfigName[i], gConfigName[j],
+ boolStr(expected), boolStr(success)));
}
bool canSucceed = src.canCopyTo(gPairs[j].fConfig);
if (success != canSucceed) {
- SkString str;
- str.printf("SkBitmap::deepCopyTo from %s to %s returned %s,"
- "but canCopyTo returned %s",
- gConfigName[i], gConfigName[j], boolStr(success),
- boolStr(canSucceed));
- reporter->reportFailed(str);
+ REPORTF(reporter,
+ ("SkBitmap::deepCopyTo from %s to %s returned %s,"
+ "but canCopyTo returned %s", gConfigName[i],
+ gConfigName[j], boolStr(success),
+ boolStr(canSucceed)));
}
TestIndividualCopy(reporter, gPairs[j].fConfig, success, src, dst);
« no previous file with comments | « tests/EmptyPathTest.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | tests/Test.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698