diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-04-10 22:37:27 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-04-10 22:37:27 +0200 |
commit | 4c7132337f96486a154e75efe394f5a1c06a77a7 (patch) | |
tree | a1b49335556b5f09bd51173344899e9f2446597d /test/storage/directory_reading.cpp | |
parent | bd531b9e080f3300c6947b0e0e515218bb395f45 (diff) | |
download | qtlocation-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.cpp | 7 |
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()); |