]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/test/compile_test/dist_find_scale_incl_test.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / libs / math / test / compile_test / dist_find_scale_incl_test.cpp
CommitLineData
7c673cae
FG
1// Copyright John Maddock 2006.
2// Use, modification and distribution are subject to the
3// Boost Software License, Version 1.0. (See accompanying file
4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5//
6// Basic sanity check that header <boost/math/distributions/find_scale.hpp>
7// #includes all the files that it needs to.
8//
9#include <boost/math/distributions/find_scale.hpp>
10//
11// Note this header includes no other headers, this is
12// important if this test is to be meaningful:
13//
14#include "test_compile_result.hpp"
15
16template <class T, class Policy = boost::math::policies::policy<> >
17class test_distribution
18{
19public:
20 typedef T value_type;
21 typedef Policy policy_type;
22 test_distribution(){}
23};
24
25template <class T, class Policy>
26T quantile(const test_distribution<T, Policy>&, T)
27{
28 return 0;
29}
30
31template <class T, class Policy>
32T quantile(const boost::math::complemented2_type<test_distribution<T, Policy>, T>&)
33{
34 return 0;
35}
36
37namespace boost{ namespace math{ namespace tools{
38
f67539c2
TL
39 template <class T, class Policy> struct is_distribution<test_distribution<T, Policy> > : public true_type{};
40 template <class T, class Policy> struct is_scaled_distribution<test_distribution<T, Policy> > : public true_type{};
7c673cae
FG
41
42}}}
43
44void compile_and_link_test()
45{
46 check_result<float>(boost::math::find_scale<test_distribution<float> >(f, f, f, boost::math::policies::policy<>()));
47 check_result<double>(boost::math::find_scale<test_distribution<double> >(d, d, d, boost::math::policies::policy<>()));
48 check_result<long double>(boost::math::find_scale<test_distribution<long double> >(l, l, l, boost::math::policies::policy<>()));
49
50 check_result<float>(boost::math::find_scale<test_distribution<float> >(f, f, f));
51 check_result<double>(boost::math::find_scale<test_distribution<double> >(d, d, d));
52 check_result<long double>(boost::math::find_scale<test_distribution<long double> >(l, l, l));
53
54 check_result<float>(boost::math::find_scale<test_distribution<float> >(boost::math::complement(f, f, f, boost::math::policies::policy<>())));
55 check_result<double>(boost::math::find_scale<test_distribution<double> >(boost::math::complement(d, d, d, boost::math::policies::policy<>())));
56 check_result<long double>(boost::math::find_scale<test_distribution<long double> >(boost::math::complement(l, l, l, boost::math::policies::policy<>())));
57
58 check_result<float>(boost::math::find_scale<test_distribution<float> >(boost::math::complement(f, f, f)));
59 check_result<double>(boost::math::find_scale<test_distribution<double> >(boost::math::complement(d, d, d)));
60 check_result<long double>(boost::math::find_scale<test_distribution<long double> >(boost::math::complement(l, l, l)));
61}
62