aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrSurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-29 09:50:47 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-29 15:17:09 +0000
commit1c80e99dd5b23ebc3f10c768857a21887ab9f090 (patch)
tree491fa16698ffb07569718ef49cbb7ac8f9562374 /tests/GrSurfaceTest.cpp
parent5effc281c70e111b3c5e9da9882c1981699af26f (diff)
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>
Diffstat (limited to 'tests/GrSurfaceTest.cpp')
-rw-r--r--tests/GrSurfaceTest.cpp14
1 files changed, 11 insertions, 3 deletions
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<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 @@ 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);
}
}
}