# pragma warning(disable: 4127) // conditional expression is constant.
#endif
-#include <boost/test/test_exec_monitor.hpp> // Boost.Test
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/special_functions/gamma.hpp> // for (incomplete) gamma.
// using boost::math::qamma_Q;
#include "table_type.hpp"
+#include "test_out_of_range.hpp"
#include <iostream>
using std::cout;
static_cast<RealType>(-1)), // bad probability.
std::domain_error);
+ BOOST_CHECK_THROW(
+ quantile(poisson_distribution<RealType>(static_cast<RealType>(1)),
+ static_cast<RealType>(1)), // bad probability.
+ std::overflow_error);
+
+ BOOST_CHECK_THROW(
+ quantile(complement(poisson_distribution<RealType>(static_cast<RealType>(1)),
+ static_cast<RealType>(0))), // bad probability.
+ std::overflow_error);
+
+ BOOST_CHECK_EQUAL(
+ quantile(poisson_distribution<RealType>(static_cast<RealType>(1)),
+ static_cast<RealType>(0)), // bad probability.
+ 0);
+
+ BOOST_CHECK_EQUAL(
+ quantile(complement(poisson_distribution<RealType>(static_cast<RealType>(1)),
+ static_cast<RealType>(1))), // bad probability.
+ 0);
+
// Check some test values.
BOOST_CHECK_CLOSE( // mode
x = quantile(complement(p6, poisson_quantile_data[i][1]));
BOOST_CHECK_EQUAL(x, floor(poisson_quantile_data[i][3] + 0.5f));
}
-
+ check_out_of_range<poisson_distribution<RealType> >(1);
} // template <class RealType>void test_spots(RealType)
//
-int test_main(int, char* [])
+BOOST_AUTO_TEST_CASE( test_main )
{
// Check that can construct normal distribution using the two convenience methods:
using namespace boost::math;
#endif
#endif
#endif
- return 0;
-} // int test_main(int, char* [])
+
+} // BOOST_AUTO_TEST_CASE( test_main )
/*