From cb06526b10d9ef44b3606c36aec498822884251e Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 13 Nov 2015 17:47:22 +0200 Subject: [tests] Remove libuv dependency from the tests --- test/storage/http_cancel.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'test/storage/http_cancel.cpp') 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 - #include #include #include @@ -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(); } -- cgit v1.2.1