source: trunk/test/version.cc @ 2522

Last change on this file since 2522 was 2522, checked in by Peter, 10 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
RevLine 
[1292]1// $Id: version.cc 2522 2011-07-15 21:20:36Z peter $
2
3/*
[2119]4  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
[1797]5  Copyright (C) 2009 Peter Johansson
[1292]6
[1469]7  This file is part of the yat library, http://dev.thep.lu.se/yat
[1292]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
[1486]11  published by the Free Software Foundation; either version 3 of the
[1292]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
[1487]20  along with yat. If not, see <http://www.gnu.org/licenses/>.
[1292]21*/
22
23#include "Suite.h"
24
25#include "yat/utility/version.h"
26
[1747]27#include <boost/version.hpp>
[1346]28#include <gsl/gsl_version.h>
29
[1292]30int main(int argc, char* argv[])
31{ 
[2522]32#if !(YAT_VERSION_AT_LEAST(0, 7, 11))
33#error "we should not be here!"
34#endif
35
[1292]36  using namespace theplu::yat::utility;
37  theplu::yat::test::Suite suite(argc, argv);
38
[1346]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";
[1292]43
[1346]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
[1747]49  suite.out() << "Boost API version: " << BOOST_LIB_VERSION << "\n";
[1346]50  suite.out() << "GSL API version: " << GSL_VERSION << "\n";
51  suite.out() << "GSL ABI version: " << gsl_version << "\n";
52
[1292]53  return suite.return_value();
54}
55
56
Note: See TracBrowser for help on using the repository browser.