Mercurial > hg > orthanc
changeset 1532:b5eb5210af91
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Aug 2015 15:04:12 +0200 |
parents | 31b3a540f508 |
children | 0011cc99443c |
files | Resources/CMake/LibCurlConfiguration.cmake UnitTestsSources/LuaTests.cpp UnitTestsSources/RestApiTests.cpp |
diffstat | 3 files changed, 19 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/LibCurlConfiguration.cmake Wed Aug 12 14:44:31 2015 +0200 +++ b/Resources/CMake/LibCurlConfiguration.cmake Wed Aug 12 15:04:12 2015 +0200 @@ -42,11 +42,10 @@ ) endif() - if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - set_property( - SOURCE ${CURL_SOURCES} - PROPERTY COMPILE_DEFINITIONS "HAVE_BOOL_T" - ) + if (MSVC) + #add_definitions( + # -DHAVE_BOOL_T=1 + # ) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
--- a/UnitTestsSources/LuaTests.cpp Wed Aug 12 14:44:31 2015 +0200 +++ b/UnitTestsSources/LuaTests.cpp Wed Aug 12 15:04:12 2015 +0200 @@ -39,7 +39,7 @@ #include <boost/lexical_cast.hpp> #if !defined(UNIT_TESTS_WITH_HTTP_CONNEXIONS) -#error "Please set UNIT_TESTS_WITH_HTTP_CONNEXIONS" +#error "Please set UNIT_TESTS_WITH_HTTP_CONNEXIONS to 0 or 1" #endif
--- a/UnitTestsSources/RestApiTests.cpp Wed Aug 12 14:44:31 2015 +0200 +++ b/UnitTestsSources/RestApiTests.cpp Wed Aug 12 15:04:12 2015 +0200 @@ -65,16 +65,23 @@ c.Apply(v); ASSERT_TRUE(v.isMember("StorageDirectory")); //ASSERT_EQ(GetLastStatusText()); - - v = Json::nullValue; - - HttpClient cc(c); - cc.SetUrl("https://www.montefiore.ulg.ac.be/~jodogne/Orthanc/Configuration.json"); - cc.Apply(v); - ASSERT_TRUE(v.isMember("LuaScripts")); #endif } + +#if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 +TEST(HttpClient, DISABLED_Ssl) +{ + HttpClient c; + c.SetUrl("https://www.montefiore.ulg.ac.be/~jodogne/Orthanc/Configuration.json"); + + Json::Value v; + c.Apply(v); + ASSERT_TRUE(v.isMember("LuaScripts")); +} +#endif + + TEST(RestApi, ChunkedBuffer) { ChunkedBuffer b;