// (C) Copyright Eric Niebler 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Test case for p_square_quantile_extended.hpp #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace boost; using namespace unit_test; using namespace boost::accumulators; typedef accumulator_set > accumulator_t; /////////////////////////////////////////////////////////////////////////////// // test_stat // void test_stat() { // tolerance double epsilon = 1e-6; // a random number generator boost::lagged_fibonacci607 rng; std::vector probs; probs.push_back(0.001); probs.push_back(0.01 ); probs.push_back(0.1 ); probs.push_back(0.25 ); probs.push_back(0.5 ); probs.push_back(0.75 ); probs.push_back(0.9 ); probs.push_back(0.99 ); probs.push_back(0.999); accumulator_t acc(tag::p_square_quantile_extended::probabilities = probs); for (int i=0; i<10000; ++i) acc(rng()); for (std::size_t i=0; i probs; probs.push_back(0.001); probs.push_back(0.01 ); probs.push_back(0.1 ); probs.push_back(0.25 ); probs.push_back(0.5 ); probs.push_back(0.75 ); probs.push_back(0.9 ); probs.push_back(0.99 ); probs.push_back(0.999); { accumulator_t acc(tag::p_square_quantile_extended::probabilities = probs); for (int i=0; i<10000; ++i) acc(rng()); for (std::size_t i=0; iadd(BOOST_TEST_CASE(&test_stat)); test->add(BOOST_TEST_CASE(&test_persistency)); return test; }