Mercurial > hg > orthanc
comparison UnitTestsSources/LuaTests.cpp @ 1439:354640db5a7f
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 01 Jul 2015 10:00:21 +0200 |
parents | ac4efabeb80c |
children | 3f7722179467 |
comparison
equal
deleted
inserted
replaced
1438:af112b7d9cba | 1439:354640db5a7f |
---|---|
247 const std::string url("http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/Product.json"); | 247 const std::string url("http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/Product.json"); |
248 #endif | 248 #endif |
249 | 249 |
250 std::string s; | 250 std::string s; |
251 lua.Execute(s, "print(HttpGet({}))"); | 251 lua.Execute(s, "print(HttpGet({}))"); |
252 ASSERT_EQ("ERROR", Orthanc::Toolbox::StripSpaces(s)); | 252 ASSERT_EQ("nil", Orthanc::Toolbox::StripSpaces(s)); |
253 | 253 |
254 #if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 | 254 #if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 |
255 lua.Execute(s, "print(string.len(HttpGet(\"" + url + "\")))"); | 255 lua.Execute(s, "print(string.len(HttpGet(\"" + url + "\")))"); |
256 ASSERT_LE(100, boost::lexical_cast<int>(Orthanc::Toolbox::StripSpaces(s))); | 256 ASSERT_LE(100, boost::lexical_cast<int>(Orthanc::Toolbox::StripSpaces(s))); |
257 | 257 |