diff options
author | halcanary <halcanary@google.com> | 2016-02-24 17:59:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-24 17:59:16 -0800 |
commit | 7d57124a2a9ed7b271568fb75b3cfd949fdb313a (patch) | |
tree | 34a0d37411771ccceb3dc4537a19c8360e1f5cfb /tests/Test.h | |
parent | 8e9f5e39d774198a5a5d9345bc9f863e855c593b (diff) |
Unit Tests: eliminate stray SkDebugf()s.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1733113002
Review URL: https://codereview.chromium.org/1733113002
Diffstat (limited to 'tests/Test.h')
-rw-r--r-- | tests/Test.h | 11 |
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) |