summaryrefslogtreecommitdiff
path: root/test/storage
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-05-07 19:57:12 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-05-13 13:54:16 -0700
commit386be7c0faf20220f1e25b1a29f478519d1e2aa9 (patch)
tree1ed1c4f6f8007111bda59c32c974cfb47c71ec8c /test/storage
parent1d38b636402a6581c491185090f5c81495a07d13 (diff)
downloadqtlocation-mapboxgl-386be7c0faf20220f1e25b1a29f478519d1e2aa9.tar.gz
Remove unused
There are no longer any requests made that don't have a run loop to dispatch back to.
Diffstat (limited to 'test/storage')
-rw-r--r--test/storage/http_noloop.cpp38
-rw-r--r--test/storage/http_reading.cpp17
2 files changed, 0 insertions, 55 deletions
diff --git a/test/storage/http_noloop.cpp b/test/storage/http_noloop.cpp
deleted file mode 100644
index e133d3e0c2..0000000000
--- a/test/storage/http_noloop.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "storage.hpp"
-
-#include <uv.h>
-
-#include <mbgl/storage/default_file_source.hpp>
-#include <mbgl/util/uv.hpp>
-
-TEST_F(Storage, HTTPNoLoop) {
- SCOPED_TEST(HTTPNoLoop)
-
- using namespace mbgl;
-
- DefaultFileSource fs(nullptr);
-
- const auto mainThread = uv_thread_self();
-
- // Async handle that keeps the main loop alive until the thread finished
- auto async = new uv_async_t;
- uv_async_init(uv_default_loop(), async, [] (uv_async_t *as, int) {
- uv::close(as);
- });
-
- fs.request({ Resource::Unknown, "http://127.0.0.1:3000/temporary-error" }, nullptr,
- [&](const Response &res) {
- EXPECT_NE(uv_thread_self(), mainThread) << "Response was called in the same thread";
- EXPECT_EQ(Response::Successful, res.status);
- EXPECT_EQ("Hello World!", res.data);
- EXPECT_EQ(0, res.expires);
- EXPECT_EQ(0, res.modified);
- EXPECT_EQ("", res.etag);
- EXPECT_EQ("", res.message);
- HTTPNoLoop.finish();
-
- uv_async_send(async);
- });
-
- uv_run(uv_default_loop(), UV_RUN_DEFAULT);
-}
diff --git a/test/storage/http_reading.cpp b/test/storage/http_reading.cpp
index 09d33fd6ab..b322bbf2a7 100644
--- a/test/storage/http_reading.cpp
+++ b/test/storage/http_reading.cpp
@@ -56,20 +56,3 @@ TEST_F(Storage, HTTPNoCallback) {
HTTPTest.finish();
}
-
-TEST_F(Storage, HTTPCallbackNotOnLoop) {
- using namespace mbgl;
-
- DefaultFileSource fs(nullptr);
-
- SCOPED_TEST(HTTPTest)
-
- std::promise<void> promise;
- fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" }, [&] (const Response &) {
- promise.set_value();
- });
-
- promise.get_future().get();
-
- HTTPTest.finish();
-}