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) |