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

Unified Diff: tests/Test.h

Issue 1733113002: Unit Tests: eliminate stray SkDebugf()s. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/StreamTest.cpp ('k') | tests/Time.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.h
diff --git a/tests/Test.h b/tests/Test.h
index fb0fd1fec83d5933b7399eccb73b5b3f40430871..d643c8382a168068412043f752ccb802c1c5d44c 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -106,6 +106,13 @@ void RunWithGPUTestContexts(T testFunction, GPUTestContexts contexts, Reporter*
REPORT_FAILURE(r, "", SkStringPrintf(__VA_ARGS__)); \
} while (0)
+#define INFOF(REPORTER, ...) \
+ do { \
+ if ((REPORTER)->verbose()) { \
+ SkDebugf(__VA_ARGS__); \
+ } \
+ } while (0)
+
#define DEF_TEST(name, reporter) \
static void test_##name(skiatest::Reporter*, GrContextFactory*); \
skiatest::TestRegistry name##TestRegistry( \
@@ -152,9 +159,7 @@ void RunWithGPUTestContexts(T testFunction, GPUTestContexts contexts, Reporter*
SkDynamicMemoryWStream testStream; \
SkAutoTUnref<SkDocument> testDoc(SkDocument::CreatePDF(&testStream)); \
if (!testDoc) { \
- if ((REPORTER) && (REPORTER)->verbose()) { \
- SkDebugf("PDF disabled; %s test skipped.", #TEST_NAME); \
- } \
+ INFOF(REPORTER, "PDF disabled; %s test skipped.", #TEST_NAME); \
return; \
} \
} while (false)
« no previous file with comments | « tests/StreamTest.cpp ('k') | tests/Time.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698