Mercurial > hg > orthanc
comparison UnitTestsSources/VersionsTests.cpp @ 1545:33d34bc4ac15
fix msvc warnings
author | jodogne |
---|---|
date | Thu, 13 Aug 2015 21:02:31 +0200 |
parents | 766a42aac55d |
children | 1f5d6a2f9638 |
comparison
equal
deleted
inserted
replaced
1544:4d0e2c38d15b | 1545:33d34bc4ac15 |
---|---|
40 #include <zlib.h> | 40 #include <zlib.h> |
41 #include <curl/curl.h> | 41 #include <curl/curl.h> |
42 #include <boost/version.hpp> | 42 #include <boost/version.hpp> |
43 #include <sqlite3.h> | 43 #include <sqlite3.h> |
44 #include <lua.h> | 44 #include <lua.h> |
45 | |
46 #if ORTHANC_SSL_ENABLED == 1 | |
45 #include <openssl/opensslv.h> | 47 #include <openssl/opensslv.h> |
48 #endif | |
46 | 49 |
47 | 50 |
48 TEST(Versions, Zlib) | 51 TEST(Versions, Zlib) |
49 { | 52 { |
50 ASSERT_STREQ(zlibVersion(), ZLIB_VERSION); | 53 ASSERT_STREQ(zlibVersion(), ZLIB_VERSION); |
116 TEST(Versions, CurlSslStatic) | 119 TEST(Versions, CurlSslStatic) |
117 { | 120 { |
118 curl_version_info_data * vinfo = curl_version_info(CURLVERSION_NOW); | 121 curl_version_info_data * vinfo = curl_version_info(CURLVERSION_NOW); |
119 | 122 |
120 // Check that SSL support is enabled when required | 123 // Check that SSL support is enabled when required |
121 bool curlSupportsSsl = vinfo->features & CURL_VERSION_SSL; | 124 bool curlSupportsSsl = (vinfo->features & CURL_VERSION_SSL) != 0; |
122 | 125 |
123 #if ORTHANC_SSL_ENABLED == 0 | 126 #if ORTHANC_SSL_ENABLED == 0 |
124 ASSERT_FALSE(curlSupportsSsl); | 127 ASSERT_FALSE(curlSupportsSsl); |
125 #else | 128 #else |
126 ASSERT_TRUE(curlSupportsSsl); | 129 ASSERT_TRUE(curlSupportsSsl); |
130 TEST(Version, LuaStatic) | 133 TEST(Version, LuaStatic) |
131 { | 134 { |
132 ASSERT_STREQ("Lua 5.1.5", LUA_RELEASE); | 135 ASSERT_STREQ("Lua 5.1.5", LUA_RELEASE); |
133 } | 136 } |
134 | 137 |
138 | |
139 #if ORTHANC_SSL_ENABLED == 1 | |
135 TEST(Version, OpenSslStatic) | 140 TEST(Version, OpenSslStatic) |
136 { | 141 { |
137 ASSERT_EQ(0x1000204fL /* openssl-1.0.2d */, OPENSSL_VERSION_NUMBER); | 142 ASSERT_EQ(0x1000204fL /* openssl-1.0.2d */, OPENSSL_VERSION_NUMBER); |
138 } | 143 } |
144 #endif | |
139 | 145 |
140 | 146 |
141 #include <json/version.h> | 147 #include <json/version.h> |
142 | 148 |
143 TEST(Version, JsonCpp) | 149 TEST(Version, JsonCpp) |