aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/StreamTest.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-12-08 13:35:47 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-11 22:06:38 +0000
commita4935104a5dfd646bfecb01b5f4618785bedaff7 (patch)
tree8f13a056c4fc765da4eaa7ceb7f865bcb4e3aeae /tests/StreamTest.cpp
parent94f509b5042c29540d0b4ef255798b8daed5ace6 (diff)
resources: optionally link them into our binary
To enable, set skia_embed_resources=true in args.gn. Also add *-EmbededResouces bots. Change-Id: Ia69b26e926a3ad4676a4fa021894432ea2104538 Reviewed-on: https://skia-review.googlesource.com/82626 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'tests/StreamTest.cpp')
-rw-r--r--tests/StreamTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index 5112312678..24e74c64b7 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -287,7 +287,13 @@ DEF_TEST(StreamPeek, reporter) {
test_fully_peekable_stream(reporter, &memStream, memStream.getLength());
// Test an arbitrary file stream. file streams do not support peeking.
- SkFILEStream fileStream(GetResourcePath("images/baby_tux.webp").c_str());
+ constexpr char filename[] = "images/baby_tux.webp";
+ SkString path = GetResourcePath(filename);
+ if (!sk_exists(path.c_str())) {
+ ERRORF(reporter, "file missing: %s\n", filename);
+ return;
+ }
+ SkFILEStream fileStream(path.c_str());
REPORTER_ASSERT(reporter, fileStream.isValid());
if (!fileStream.isValid()) {
return;