Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(995)

Unified Diff: tests/SkBlend_optsTest.cpp

Issue 1987143002: Make SkBlend_optsTests fail rather than crash when resources are missing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SkBlend_optsTest.cpp
diff --git a/tests/SkBlend_optsTest.cpp b/tests/SkBlend_optsTest.cpp
index ee60d5ebdfc7149360a8d8f801b9d27eabeab4cf..06b7c1ade2c252d02387882deab7041cda9264c9 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698