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 <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 72a92a7..d1385b8 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -123,7 +123,9 @@
desc.fSampleCnt = 0;
sk_sp<GrSurface> 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 @@
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);
}
}
}