From 70742c7a61792b5d5825abc9f205ae7697195fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 16 Apr 2014 15:41:19 -0400 Subject: add libcurl loading --- test/headless.cpp | 24 ++++++++---------------- test/test.gyp | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 16 deletions(-) (limited to 'test') 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 #include +#include + double llmr::platform::elapsed() { return 0; } void llmr::platform::restart() { - // TODO -} - -std::shared_ptr -llmr::platform::request_http(const std::string &url, std::function background_function, - std::function foreground_callback) { - // TODO - return nullptr; + // noop } -void llmr::platform::cancel_request_http(const std::shared_ptr &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 @@ -21,6 +21,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", @@ -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", ] }, { -- cgit v1.2.1