summaryrefslogtreecommitdiff
path: root/test/storage/http_cancel.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-11-13 17:47:22 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-12-01 11:49:02 +0200
commitcb06526b10d9ef44b3606c36aec498822884251e (patch)
tree822be48cb08a3cb51074689fbef4f92578a556ed /test/storage/http_cancel.cpp
parentae3f1c79faa34337628d671d071a82ac97a66081 (diff)
downloadqtlocation-mapboxgl-cb06526b10d9ef44b3606c36aec498822884251e.tar.gz
[tests] Remove libuv dependency from the tests
Diffstat (limited to 'test/storage/http_cancel.cpp')
-rw-r--r--test/storage/http_cancel.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/storage/http_cancel.cpp b/test/storage/http_cancel.cpp
index 52e23020be..442a159fe5 100644
--- a/test/storage/http_cancel.cpp
+++ b/test/storage/http_cancel.cpp
@@ -1,7 +1,5 @@
#include "storage.hpp"
-#include <uv.h>
-
#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/chrono.hpp>
@@ -14,8 +12,8 @@ TEST_F(Storage, HTTPCancel) {
using namespace mbgl;
+ util::RunLoop loop;
DefaultFileSource fs(nullptr);
- util::RunLoop loop(uv_default_loop());
auto req =
fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
@@ -24,7 +22,7 @@ TEST_F(Storage, HTTPCancel) {
req.reset();
HTTPCancel.finish();
- uv_run(uv_default_loop(), UV_RUN_ONCE);
+ loop.runOnce();
}
TEST_F(Storage, HTTPCancelMultiple) {
@@ -32,8 +30,8 @@ TEST_F(Storage, HTTPCancelMultiple) {
using namespace mbgl;
+ util::RunLoop loop;
DefaultFileSource fs(nullptr);
- util::RunLoop loop(uv_default_loop());
const Resource resource { Resource::Unknown, "http://127.0.0.1:3000/test" };
@@ -54,5 +52,5 @@ TEST_F(Storage, HTTPCancelMultiple) {
});
req2.reset();
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
+ loop.run();
}