From 1c80e99dd5b23ebc3f10c768857a21887ab9f090 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 29 Jan 2018 09:50:47 -0500 Subject: Allow printf style var args for messages in REPORTER_ASSERT. Remove REPORTER_ASSERT_MESSAGE. Change-Id: I6d00715901159c93e22d182fe24aac92b5fdbcf4 Reviewed-on: https://skia-review.googlesource.com/100361 Commit-Queue: Brian Salomon Reviewed-by: Mike Klein --- tests/GrSurfaceTest.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests/GrSurfaceTest.cpp') diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index 72a92a709d..d1385b826c 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp @@ -123,7 +123,9 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { desc.fSampleCnt = 0; sk_sp tex = resourceProvider->createTexture(desc, SkBudgeted::kNo); - REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigTexturable(desc.fConfig)); + bool ict = caps->isConfigTexturable(desc.fConfig); + REPORTER_ASSERT(reporter, SkToBool(tex) == ict, + "config:%d, tex:%d, isConfigTexturable:%d", config, SkToBool(tex), ict); size_t rowBytes = desc.fWidth * GrBytesPerPixel(desc.fConfig); for (int i = 0; i < levelCount; ++i) { @@ -141,11 +143,17 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { desc.fFlags = kRenderTarget_GrSurfaceFlag; tex = resourceProvider->createTexture(desc, SkBudgeted::kNo); - REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigRenderable(config, false)); + bool icr = caps->isConfigRenderable(config, false); + REPORTER_ASSERT(reporter, SkToBool(tex) == icr, + "config:%d, tex:%d, isConfigRenderable(false):%d", config, + SkToBool(tex), icr); desc.fSampleCnt = 4; tex = resourceProvider->createTexture(desc, SkBudgeted::kNo); - REPORTER_ASSERT(reporter, SkToBool(tex.get()) == caps->isConfigRenderable(config, true)); + icr = caps->isConfigRenderable(config, true); + REPORTER_ASSERT(reporter, SkToBool(tex) == icr, + "config:%d, tex:%d, isConfigRenderable(true):%d", config, SkToBool(tex), + icr); } } } -- cgit v1.2.3