commit | 037655f4dc58e9c9c613b426838d478bd8a01c84 | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Tue May 17 18:36:23 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Tue May 17 18:36:23 2016 -0700 |
tree | 63df69a5851a954c29baa2d6e6b0fdffa7dd5b1f | |
parent | 264f88aff5c2303339c1dbcad02e12f70c62ae72 [diff] |
Make SkBlend_optsTests fail rather than crash when resources are missing BUG=skia:5314 TBR=herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1987143002 Review-Url: https://codereview.chromium.org/1987143002
diff --git a/tests/SkBlend_optsTest.cpp b/tests/SkBlend_optsTest.cpp index ee60d5e..06b7c1a 100644 --- a/tests/SkBlend_optsTest.cpp +++ b/tests/SkBlend_optsTest.cpp
@@ -62,13 +62,14 @@ 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;