source: trunk/test/version.cc @ 2522

Last change on this file since 2522 was 2522, checked in by Peter, 12 years ago

add test for macro YAT_VERSION_AT_LEAST

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1// $Id: version.cc 2522 2011-07-15 21:20:36Z peter $
2
3/*
4  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
5  Copyright (C) 2009 Peter Johansson
6
7  This file is part of the yat library, http://dev.thep.lu.se/yat
8
9  The yat library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 3 of the
12  License, or (at your option) any later version.
13
14  The yat library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with yat. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#include "Suite.h"
24
25#include "yat/utility/version.h"
26
27#include <boost/version.hpp>
28#include <gsl/gsl_version.h>
29
30int main(int argc, char* argv[])
31{ 
32#if !(YAT_VERSION_AT_LEAST(0, 7, 11))
33#error "we should not be here!"
34#endif
35
36  using namespace theplu::yat::utility;
37  theplu::yat::test::Suite suite(argc, argv);
38
39  suite.out() << "API version: " << YAT_VERSION << "\n";
40  suite.out() << "    major:   " << YAT_MAJOR_VERSION << "\n";
41  suite.out() << "    minor:   " << YAT_MINOR_VERSION << "\n";
42  suite.out() << "    patch:   " << YAT_PATCH_VERSION << "\n";
43
44  suite.out() << "ABI version: " << version() << "\n";
45  suite.out() << "    major:   " << major_version() << "\n";
46  suite.out() << "    minor:   " << minor_version() << "\n";
47  suite.out() << "    patch:   " << patch_version() << "\n";
48
49  suite.out() << "Boost API version: " << BOOST_LIB_VERSION << "\n";
50  suite.out() << "GSL API version: " << GSL_VERSION << "\n";
51  suite.out() << "GSL ABI version: " << gsl_version << "\n";
52
53  return suite.return_value();
54}
55
56
Note: See TracBrowser for help on using the repository browser.