annotate UnitTestsSources/VersionsTests.cpp @ 3962:d30eb4ae5bb6

trying a fix for msvc2008
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 May 2020 20:53:59 +0200
parents 35065dd39cc8
children f9863630ec7f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
1 /**
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1830
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1288
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 967
diff changeset
4 * Department, University Hospital of Liege, Belgium
3640
94f4a18a79cc upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3564
diff changeset
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
827
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
6 *
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
7 * This program is free software: you can redistribute it and/or
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
8 * modify it under the terms of the GNU General Public License as
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
10 * License, or (at your option) any later version.
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
11 *
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
12 * In addition, as a special exception, the copyright holders of this
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
13 * program give permission to link the code of its release with the
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
16 * the linked executables. You must obey the GNU General Public License
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
20 * you do not wish to do so, delete this exception statement from your
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
21 * version. If you delete this exception statement from all source files
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
22 * in the program, then also delete it here.
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
23 *
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
24 * This program is distributed in the hope that it will be useful, but
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
27 * General Public License for more details.
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
28 *
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
29 * You should have received a copy of the GNU General Public License
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
31 **/
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
32
3d6f9b7d0add precompiled headers in unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
33
831
84513f2ee1f3 pch for unit tests and server
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 827
diff changeset
34 #include "PrecompiledHeadersUnitTests.h"
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 #include "gtest/gtest.h"
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include <stdint.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 #include <math.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include <png.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 #include <ctype.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #include <zlib.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #include <curl/curl.h>
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 #include <boost/version.hpp>
181
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
44 #include <sqlite3.h>
382
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
45 #include <lua.h>
1604
1f5d6a2f9638 JpegReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1545
diff changeset
46 #include <jpeglib.h>
3244
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3241
diff changeset
47
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3241
diff changeset
48 #if BUILDING_LIBICONV == 1
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3241
diff changeset
49 # include <iconv.h>
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3241
diff changeset
50 #endif
1545
33d34bc4ac15 fix msvc warnings
jodogne
parents: 1530
diff changeset
51
2136
dd609a99d39a uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2097
diff changeset
52 #if ORTHANC_ENABLE_SSL == 1
3068
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
53 # include <openssl/opensslv.h>
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
54 #endif
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
55
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
56 #if ORTHANC_ENABLE_CIVETWEB == 1
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
57 # include <civetweb.h>
1545
33d34bc4ac15 fix msvc warnings
jodogne
parents: 1530
diff changeset
58 #endif
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
3288
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
60 #if ORTHANC_ENABLE_PUGIXML == 1
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
61 # include <pugixml.hpp>
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
62 #endif
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
63
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 TEST(Versions, Zlib)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 ASSERT_STREQ(zlibVersion(), ZLIB_VERSION);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 TEST(Versions, Curl)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 ASSERT_STREQ(LIBCURL_VERSION, v->version);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 TEST(Versions, Png)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 ASSERT_EQ(PNG_LIBPNG_VER_MAJOR * 10000 + PNG_LIBPNG_VER_MINOR * 100 + PNG_LIBPNG_VER_RELEASE,
1492
9f66a12eb8fc fix warnings for gcc 5
jodogne
parents: 1478
diff changeset
79 static_cast<int>(png_access_version_number()));
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
181
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
82 TEST(Versions, SQLite)
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
83 {
1478
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
84 #if defined(__APPLE__)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
85 // Under OS X, there might exist minor differences between the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
86 // version of the headers and the version of the library, for the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
87 // system-wide SQLite. Ignore these differences.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
88 #else
181
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
89 // http://www.sqlite.org/capi3ref.html#sqlite3_libversion
1478
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
90 EXPECT_EQ(sqlite3_libversion_number(), SQLITE_VERSION_NUMBER);
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
91 EXPECT_STREQ(sqlite3_libversion(), SQLITE_VERSION);
3564
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
92
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
93 /**
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
94 * On Orthanc > 1.5.8, we comment out the following test, that is
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
95 * too strict for some GNU/Linux distributions to apply their own
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
96 * security fixes. Checking the main version macros is sufficient.
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
97 * https://bugzilla.suse.com/show_bug.cgi?id=1154550#c2
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
98 **/
9a4db48ff5b1 removed too strict unit test on SQLite version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3290
diff changeset
99 // EXPECT_STREQ(sqlite3_sourceid(), SQLITE_SOURCE_ID);
1478
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1477
diff changeset
100 #endif
181
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
101
194
0186ac92810c fixes for Ubuntu 10.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 181
diff changeset
102 // Ensure that the SQLite version is above 3.7.0.
0186ac92810c fixes for Ubuntu 10.04
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 181
diff changeset
103 // "sqlite3_create_function_v2" is not defined in previous versions.
181
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
104 ASSERT_GE(SQLITE_VERSION_NUMBER, 3007000);
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
105 }
2dece1526c06 simplifying db schema
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 63
diff changeset
106
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
382
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
108 TEST(Versions, Lua)
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
109 {
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
110 // Ensure that the Lua version is above 5.1.0. This version has
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
111 // introduced some API changes.
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
112 ASSERT_GE(LUA_VERSION_NUM, 501);
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
113 }
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
114
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
115
3688
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
116 #if ORTHANC_ENABLE_CIVETWEB == 1
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
117 TEST(Version, CivetwebCompression)
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
118 {
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
119 ASSERT_TRUE(mg_check_feature(MG_FEATURES_COMPRESSION));
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
120 }
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
121 #endif
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
122
9c091747483a Enable support of compression in civetweb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
123
63
f1d0470ff334 renaming unittests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 50
diff changeset
124 #if ORTHANC_STATIC == 1
1502
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
125
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 TEST(Versions, ZlibStatic)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 {
2509
9d9f2d088dce upgrade to zlib 1.2.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2497
diff changeset
128 ASSERT_STREQ("1.2.11", zlibVersion());
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 TEST(Versions, BoostStatic)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 {
3283
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3244
diff changeset
133 ASSERT_STREQ("1_69", BOOST_LIB_VERSION);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 TEST(Versions, CurlStatic)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
3290
544905c73c7e upgrade to curl 1.64.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3288
diff changeset
139 ASSERT_STREQ("7.64.0", v->version);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 TEST(Versions, PngStatic)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 {
3287
5e8e020893d0 upgrade to openssl 1.0.2p
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3286
diff changeset
144 ASSERT_EQ(10636u, png_access_version_number());
3285
3f7d4b735f95 upgrade to libpng 1.6.36
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3283
diff changeset
145 ASSERT_STREQ("1.6.36", PNG_LIBPNG_VER_STRING);
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 }
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
147
1604
1f5d6a2f9638 JpegReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1545
diff changeset
148 TEST(Versions, JpegStatic)
1f5d6a2f9638 JpegReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1545
diff changeset
149 {
1f5d6a2f9638 JpegReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1545
diff changeset
150 ASSERT_EQ(9, JPEG_LIB_VERSION_MAJOR);
3286
2b547eaed193 upgrade to libjpeg 9c
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3285
diff changeset
151 ASSERT_EQ(3, JPEG_LIB_VERSION_MINOR);
1604
1f5d6a2f9638 JpegReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1545
diff changeset
152 }
1f5d6a2f9638 JpegReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1545
diff changeset
153
382
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
154 TEST(Versions, CurlSslStatic)
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
155 {
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
156 curl_version_info_data * vinfo = curl_version_info(CURLVERSION_NOW);
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
157
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
158 // Check that SSL support is enabled when required
1545
33d34bc4ac15 fix msvc warnings
jodogne
parents: 1530
diff changeset
159 bool curlSupportsSsl = (vinfo->features & CURL_VERSION_SSL) != 0;
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
160
2136
dd609a99d39a uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2097
diff changeset
161 #if ORTHANC_ENABLE_SSL == 0
29
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
162 ASSERT_FALSE(curlSupportsSsl);
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
163 #else
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
164 ASSERT_TRUE(curlSupportsSsl);
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
165 #endif
042ac60f5bf9 simplified build of curl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
166 }
382
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
167
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
168 TEST(Version, LuaStatic)
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
169 {
2947
11f8d72f366f Lua 5.3.5
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2930
diff changeset
170 ASSERT_STREQ("Lua 5.3.5", LUA_RELEASE);
382
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 194
diff changeset
171 }
748
de9763f63510 upgrade to openssl-1.0.1g because of heartbeat exploit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 632
diff changeset
172
3241
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3068
diff changeset
173
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3068
diff changeset
174 #if BUILDING_LIBICONV == 1
2366
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
175 TEST(Version, LibIconvStatic)
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
176 {
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
177 static const int major = 1;
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
178 static const int minor = 15;
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
179 ASSERT_EQ((major << 8) + minor, _LIBICONV_VERSION);
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
180 }
3241
32596919d729 first compilation combining ICU and LSB
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3068
diff changeset
181 #endif
2366
26f3a346226f more consistent handling of libiconv in cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2327
diff changeset
182
1545
33d34bc4ac15 fix msvc warnings
jodogne
parents: 1530
diff changeset
183
2136
dd609a99d39a uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2097
diff changeset
184 #if ORTHANC_ENABLE_SSL == 1
748
de9763f63510 upgrade to openssl-1.0.1g because of heartbeat exploit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 632
diff changeset
185 TEST(Version, OpenSslStatic)
de9763f63510 upgrade to openssl-1.0.1g because of heartbeat exploit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 632
diff changeset
186 {
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3688
diff changeset
187 ASSERT_TRUE(OPENSSL_VERSION_NUMBER == 0x1000210fL /* openssl-1.0.2p */ ||
3890
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
188 OPENSSL_VERSION_NUMBER == 0x1010107fL /* openssl-1.1.1g */);
748
de9763f63510 upgrade to openssl-1.0.1g because of heartbeat exploit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 632
diff changeset
189 }
1545
33d34bc4ac15 fix msvc warnings
jodogne
parents: 1530
diff changeset
190 #endif
748
de9763f63510 upgrade to openssl-1.0.1g because of heartbeat exploit
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 632
diff changeset
191
1502
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
192
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
193 #include <json/version.h>
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
194
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
195 TEST(Version, JsonCpp)
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
196 {
2497
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
197 #if ORTHANC_LEGACY_JSONCPP == 1
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
198 ASSERT_STREQ("0.10.6", JSONCPP_VERSION_STRING);
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
199 #elif ORTHANC_LEGACY_JSONCPP == 0
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
200 ASSERT_STREQ("1.8.4", JSONCPP_VERSION_STRING);
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
201 #else
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
202 # error Macro ORTHANC_LEGACY_JSONCPP should be set
0611aa383e62 Upgrade to JsonCpp 1.8.4, and USE_LEGACY_JSONCPP option
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2449
diff changeset
203 #endif
1502
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
204 }
5e9c40419fb9 Upgrade to JsonCpp 0.10.5 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1492
diff changeset
205
3068
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
206
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
207 #if ORTHANC_ENABLE_CIVETWEB == 1
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
208 TEST(Version, Civetweb)
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
209 {
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
210 ASSERT_EQ(1, CIVETWEB_VERSION_MAJOR);
3802
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
211 ASSERT_EQ(12, CIVETWEB_VERSION_MINOR);
3068
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
212 ASSERT_EQ(0, CIVETWEB_VERSION_PATCH);
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
213 }
37
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 29
diff changeset
214 #endif
3068
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
215
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
216
3288
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
217 #if ORTHANC_ENABLE_PUGIXML == 1
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
218 TEST(Version, Pugixml)
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
219 {
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
220 ASSERT_EQ(190, PUGIXML_VERSION);
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
221 }
3068
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
222 #endif
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
223
ad37c21ec4db fix compatibility with civetweb 1.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
224
3288
8d1ea00a990a upgrade to pugixml 1.9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3287
diff changeset
225 #endif