aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Test.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-02-24 17:59:16 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-24 17:59:16 -0800
commit7d57124a2a9ed7b271568fb75b3cfd949fdb313a (patch)
tree34a0d37411771ccceb3dc4537a19c8360e1f5cfb /tests/Test.h
parent8e9f5e39d774198a5a5d9345bc9f863e855c593b (diff)
Unit Tests: eliminate stray SkDebugf()s.
Diffstat (limited to 'tests/Test.h')
-rw-r--r--tests/Test.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/Test.h b/tests/Test.h
index fb0fd1fec8..d643c8382a 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)