Fix symlinks
[anna.git] / test / config / main.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #include <iostream>
10
11 #include <limits.h>
12
13 #include <anna/config/Release.hpp>
14 #include <anna/core/util/defines.hpp>
15
16 #include <gtest/gtest.h>
17
18
19 using namespace std;
20 using namespace anna;
21
22 TEST(config, release) {
23   string version = config::Release::getVersion();
24   cout << version << endl;
25   EXPECT_TRUE(version.empty() == false);
26   int debug = version.find("/D");
27   int release = version.find("/O");
28 #ifdef _DEBUG
29   EXPECT_TRUE(debug != string::npos);
30   EXPECT_TRUE(release == string::npos);
31 #else
32   EXPECT_TRUE(debug == string::npos);
33   EXPECT_TRUE(
34     release != string::npos);
35 #endif
36 }
37
38 TEST(config, numbers) {
39   S64 ii64;
40   ii64 = LLONG_MAX;
41   EXPECT_EQ(ii64, LLONG_MAX);
42   ii64 = LLONG_MIN;
43   EXPECT_EQ(ii64, LLONG_MIN);
44   U64 u64;
45   u64 = ULLONG_MAX;
46   EXPECT_EQ(u64, ULLONG_MAX);
47 }
48
49 int main(int argc, char **argv)
50 {
51     testing::InitGoogleTest(&argc, argv);
52     return RUN_ALL_TESTS();
53 }
54