comparison UnitTests/Versions.cpp @ 0:3959d33612cc

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Jul 2012 14:32:22 +0200
parents
children 3a584803783e
comparison
equal deleted inserted replaced
-1:000000000000 0:3959d33612cc
1 #include "gtest/gtest.h"
2
3 #include <stdint.h>
4 #include <math.h>
5 #include <png.h>
6 #include <ctype.h>
7 #include <zlib.h>
8 #include <curl/curl.h>
9 #include <boost/version.hpp>
10
11
12 TEST(Versions, Zlib)
13 {
14 ASSERT_STREQ(zlibVersion(), ZLIB_VERSION);
15 }
16
17 TEST(Versions, Curl)
18 {
19 curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
20 ASSERT_STREQ(LIBCURL_VERSION, v->version);
21 }
22
23 TEST(Versions, Png)
24 {
25 ASSERT_EQ(PNG_LIBPNG_VER_MAJOR * 10000 + PNG_LIBPNG_VER_MINOR * 100 + PNG_LIBPNG_VER_RELEASE,
26 png_access_version_number());
27 }
28
29
30 #if PALANTIR_STATIC == 1
31 TEST(Versions, ZlibStatic)
32 {
33 ASSERT_STREQ("1.2.7", zlibVersion());
34 }
35
36 TEST(Versions, BoostStatic)
37 {
38 ASSERT_EQ("1_49", BOOST_LIB_VERSION);
39 }
40
41 TEST(Versions, CurlStatic)
42 {
43 curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
44 ASSERT_STREQ("7.26.0", v->version);
45 }
46
47 TEST(Versions, PngStatic)
48 {
49 ASSERT_EQ(10512, png_access_version_number());
50 ASSERT_STREQ("1.5.12", PNG_LIBPNG_VER_STRING);
51 }
52 #endif