boost/libs/multiprecision/test/test_cpp_dec_float_serial.cpp

33 lines
775 B
C++
Raw Normal View History

2018-01-12 21:47:58 +01:00
///////////////////////////////////////////////////////////////
// Copyright 2013 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
2021-10-05 21:37:46 +02:00
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
2018-01-12 21:47:58 +01:00
//
// Compare arithmetic results using fixed_int to GMP results.
//
#ifdef _MSC_VER
2021-10-05 21:37:46 +02:00
#define _SCL_SECURE_NO_WARNINGS
2018-01-12 21:47:58 +01:00
#endif
#include <boost/multiprecision/cpp_dec_float.hpp>
#include "test_float_serial.hpp"
#if !defined(TEST1) && !defined(TEST2)
2021-10-05 21:37:46 +02:00
#define TEST1
#define TEST2
2018-01-12 21:47:58 +01:00
#endif
int main()
{
using namespace boost::multiprecision;
#ifdef TEST1
test<cpp_dec_float_50>();
#endif
#ifdef TEST2
2021-10-05 21:37:46 +02:00
test<number<cpp_dec_float<100, std::int64_t, std::allocator<char> > > >();
2018-01-12 21:47:58 +01:00
#endif
return boost::report_errors();
}