update uv_zip and add tests

This commit is contained in:
Konstantin Käfer
2015-02-16 18:30:19 -08:00
parent 8d3c2b3d30
commit fe0baffe0d
11 changed files with 144 additions and 32 deletions

View File

@@ -4,6 +4,7 @@
#include <mbgl/storage/default/http_request.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/platform/platform.hpp>
#include <mbgl/util/async_queue.hpp>
#include <mbgl/util/util.hpp>
@@ -49,8 +50,9 @@ struct DefaultFileSource::StopAction {
};
DefaultFileSource::DefaultFileSource(FileCache *cache_)
: loop(uv_loop_new()),
DefaultFileSource::DefaultFileSource(FileCache *cache_, const std::string &root)
: assetRoot(root.empty() ? platform::assetRoot() : root),
loop(uv_loop_new()),
cache(cache_),
queue(new Queue(loop, [this](Action &action) {
mapbox::util::apply_visitor(ActionDispatcher{*this}, action);
@@ -63,8 +65,9 @@ DefaultFileSource::DefaultFileSource(FileCache *cache_)
}) {
}
DefaultFileSource::DefaultFileSource(FileCache *cache_, uv_loop_t *loop_)
: loop(loop_),
DefaultFileSource::DefaultFileSource(FileCache *cache_, uv_loop_t *loop_, const std::string &root)
: assetRoot(root.empty() ? platform::assetRoot() : root),
loop(loop_),
cache(cache_),
queue(new Queue(loop, [this](Action &action) {
mapbox::util::apply_visitor(ActionDispatcher{*this}, action);