aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Test.h
diff options
context:
space:
mode:
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)