aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-17 18:36:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-17 18:36:23 -0700
commit037655f4dc58e9c9c613b426838d478bd8a01c84 (patch)
tree63df69a5851a954c29baa2d6e6b0fdffa7dd5b1f /tests
parent264f88aff5c2303339c1dbcad02e12f70c62ae72 (diff)
Make SkBlend_optsTests fail rather than crash when resources are missing
Diffstat (limited to 'tests')
-rw-r--r--tests/SkBlend_optsTest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/SkBlend_optsTest.cpp b/tests/SkBlend_optsTest.cpp
index ee60d5ebdf..06b7c1ade2 100644
--- a/tests/SkBlend_optsTest.cpp
+++ b/tests/SkBlend_optsTest.cpp
@@ -62,13 +62,14 @@ static void test_blender(
std::string fileName = resourceName + ".png";
sk_sp<SkImage> image = GetResourceAsImage(fileName.c_str());
- SkASSERT(image != nullptr);
if (image == nullptr) {
- SkFAIL("image is NULL");
+ ERRORF(reporter, "image is NULL");
+ return;
}
SkBitmap bm;
if (!as_IB(image)->getROPixels(&bm)) {
- SkFAIL("Could not read resource");
+ ERRORF(reporter, "Could not read resource");
+ return;
}
SkPixmap pixmap;