예제 #1
0
 void run(T& x, strong_type& strong) const {
     for(BOOST_DEDUCED_TYPENAME test::random_values<T>::const_iterator
             it = this->values.begin(), end = this->values.end(); it != end; ++it)
     {
         strong.store(x, test::exception::detail::tracker.count_allocations);
         x.insert(x.begin(), *it);
     }
 }
예제 #2
0
    void run(T& x, strong_type& strong) const {
        BOOST_DEDUCED_TYPENAME T::size_type bucket_count = x.bucket_count();
        int count = 0;

        for(BOOST_DEDUCED_TYPENAME test::random_values<T>::const_iterator
            it = boost::next(this->values.begin(), x.size()), end = this->values.end();
            it != end && count < 10; ++it, ++count)
        {
            strong.store(x, test::exception::detail::tracker.count_allocations);
            x.insert(*it);
        }

        // This isn't actually a failure, but it means the test isn't doing its
        // job.
        BOOST_TEST(x.bucket_count() != bucket_count);
    }