diff options
author | 2016-05-17 18:36:23 -0700 | |
---|---|---|
committer | 2016-05-17 18:36:23 -0700 | |
commit | 037655f4dc58e9c9c613b426838d478bd8a01c84 (patch) | |
tree | 63df69a5851a954c29baa2d6e6b0fdffa7dd5b1f /tests | |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SkBlend_optsTest.cpp | 7 |
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; |