summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-04-16 15:41:19 -0400
committerKonstantin Käfer <mail@kkaefer.com>2014-04-16 15:41:19 -0400
commit70742c7a61792b5d5825abc9f205ae7697195fac (patch)
treea403607b32a1f12af87985ce3e2f755e5c8e8e2e /test
parent9f815b447b0f89553c3a8d3eb3e4dc027a59a16f (diff)
downloadqtlocation-mapboxgl-70742c7a61792b5d5825abc9f205ae7697195fac.tar.gz
add libcurl loading
Diffstat (limited to 'test')
-rw-r--r--test/headless.cpp24
-rw-r--r--test/test.gyp30
2 files changed, 38 insertions, 16 deletions
diff --git a/test/headless.cpp b/test/headless.cpp
index d1059f750b..0dbf79d40d 100644
--- a/test/headless.cpp
+++ b/test/headless.cpp
@@ -8,29 +8,16 @@
#include <llmr/util/image.hpp>
#include <llmr/util/io.hpp>
+#include <uv.h>
+
double llmr::platform::elapsed() {
return 0;
}
void llmr::platform::restart() {
- // TODO
-}
-
-std::shared_ptr<llmr::platform::Request>
-llmr::platform::request_http(const std::string &url, std::function<void(Response *)> background_function,
- std::function<void()> foreground_callback) {
- // TODO
- return nullptr;
+ // noop
}
-void llmr::platform::cancel_request_http(const std::shared_ptr<Request> &req) {
- // TODO
-}
-
-
-
-
-
TEST(Headless, initialize) {
llmr::Settings settings;
@@ -110,11 +97,16 @@ TEST(Headless, initialize) {
return;
}
+
map.setup();
map.resize(width, height);
map.loadSettings();
map.update();
+
+ // Run the loop. It will terminate when we don't have any further listeners.
+ uv_run(uv_default_loop(), UV_RUN_DEFAULT);
+
map.render();
diff --git a/test/test.gyp b/test/test.gyp
index a04b4ba783..98e9b125b0 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -22,6 +22,33 @@
},
},
{
+ 'target_name': 'link_curl',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'conditions': [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS':[
+ '<@(curl_cflags)',
+ ],
+ 'OTHER_LDFLAGS': [
+ '<@(curl_libraries)',
+ ],
+ },
+ }, {
+ 'cflags': [
+ '<@(curl_cflags)',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '<@(curl_libraries)',
+ ],
+ },
+ }],
+ ],
+ },
+ },
+ {
"target_name": "rotation_range",
"product_name": "test_rotation_range",
"type": "executable",
@@ -47,11 +74,14 @@
"sources": [
"./main.cpp",
"./headless.cpp",
+ "../common/curl_request.hpp",
+ "../common/curl_request.cpp",
],
"dependencies": [
"../deps/gtest/gtest.gyp:gtest",
"../llmr.gyp:llmr-x86",
"link_gl",
+ "link_curl",
]
},
{