summaryrefslogtreecommitdiff
path: root/test/storage/directory_reading.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-01-23 11:04:26 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-02-04 10:49:06 +0100
commit4a985e09f2addcc9cb86f435b5a87517d20ec483 (patch)
tree9a004e7a29b90ebd9d470007946bddfdee3470ec /test/storage/directory_reading.cpp
parent9a549094e02b046eb67a3c3a1ed8df96791825ca (diff)
downloadqtlocation-mapboxgl-4a985e09f2addcc9cb86f435b5a87517d20ec483.tar.gz
asset:// URLs are local to the executable path now
Diffstat (limited to 'test/storage/directory_reading.cpp')
-rw-r--r--test/storage/directory_reading.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/storage/directory_reading.cpp b/test/storage/directory_reading.cpp
index 90b7846fdd..84221f3f21 100644
--- a/test/storage/directory_reading.cpp
+++ b/test/storage/directory_reading.cpp
@@ -11,14 +11,13 @@ TEST_F(Storage, ReadDirectory) {
DefaultFileSource fs(nullptr, uv_default_loop());
- const auto dir = std::string { "asset://" } + mbgl::test::getBaseDirectory() + "/fixtures/storage";
- fs.request({ Resource::Unknown, dir }, uv_default_loop(), [&](const Response &res) {
- EXPECT_EQ(res.status, Response::Error);
- EXPECT_EQ(res.data.size(), 0ul);
- EXPECT_EQ(res.expires, 0);
- EXPECT_EQ(res.modified, 0);
- EXPECT_EQ(res.etag, "");
- EXPECT_EQ(res.message, "illegal operation on a directory");
+ fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage" }, uv_default_loop(), [&](const Response &res) {
+ EXPECT_EQ(Response::Error, res.status);
+ EXPECT_EQ(0ul, res.data.size());
+ EXPECT_EQ(0, res.expires);
+ EXPECT_EQ(0, res.modified);
+ EXPECT_EQ("", res.etag);
+ EXPECT_EQ("illegal operation on a directory", res.message);
ReadDirectory.finish();
});