[go: up one dir, main page]

1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2019 Aprexo Limited
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20#include "compiledboostversion.hpp"
21#include "utilities.hpp"
22
23#include <ql/version.hpp>
24
25#include <boost/version.hpp>
26
27using namespace QuantLib;
28using namespace boost::unit_test_framework;
29
30void CompiledBoostVersionTest::test() {
31
32 BOOST_TEST_MESSAGE("Testing compiled boost version...");
33
34 // this will fail if the test suite is being built with a different boost version than the library was
35 BOOST_CHECK(QuantLib::compiledBoostVersion() == BOOST_VERSION);
36}
37
38
39test_suite* CompiledBoostVersionTest::suite() {
40 auto* suite = BOOST_TEST_SUITE("Compiled boost version test");
41 suite->add(QUANTLIB_TEST_CASE(&CompiledBoostVersionTest::test));
42 return suite;
43}
44
45

source code of quantlib/test-suite/compiledboostversion.cpp