summaryrefslogtreecommitdiff
path: root/test/storage/directory_reading.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-04-10 22:37:27 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-04-10 22:37:27 +0200
commit4c7132337f96486a154e75efe394f5a1c06a77a7 (patch)
treea1b49335556b5f09bd51173344899e9f2446597d /test/storage/directory_reading.cpp
parentbd531b9e080f3300c6947b0e0e515218bb395f45 (diff)
downloadqtlocation-mapboxgl-4c7132337f96486a154e75efe394f5a1c06a77a7.tar.gz
convert DefaultFileSource to use util::Thread<>
Diffstat (limited to 'test/storage/directory_reading.cpp')
-rw-r--r--test/storage/directory_reading.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/storage/directory_reading.cpp b/test/storage/directory_reading.cpp
index a955648462..4264129b22 100644
--- a/test/storage/directory_reading.cpp
+++ b/test/storage/directory_reading.cpp
@@ -3,6 +3,7 @@
#include <uv.h>
#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/util/thread.hpp>
TEST_F(Storage, AssetReadDirectory) {
SCOPED_TEST(ReadDirectory)
@@ -10,14 +11,14 @@ TEST_F(Storage, AssetReadDirectory) {
using namespace mbgl;
#ifdef MBGL_ASSET_ZIP
- DefaultFileSource fs(nullptr, uv_default_loop(), "test/fixtures/storage/assets.zip");
+ util::Thread<DefaultFileSource> fs(nullptr, "test/fixtures/storage/assets.zip");
#else
- DefaultFileSource fs(nullptr, uv_default_loop());
+ util::Thread<DefaultFileSource> fs(nullptr);
#endif
auto &env = *static_cast<const Environment *>(nullptr);
- fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage" }, uv_default_loop(),
+ fs->request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage" }, uv_default_loop(),
env, [&](const Response &res) {
EXPECT_EQ(Response::Error, res.status);
EXPECT_EQ(0ul, res.data.size());