1 #include <boost/test/unit_test.hpp>
19 int size()
const {
return set.size(); }
25 BOOST_CHECK(mru == set);
29 BOOST_AUTO_TEST_SUITE(mruset_tests)
35 for (
int nTest=0; nTest<
NUM_TESTS; nTest++)
47 for (
int nTest=0; nTest<
NUM_TESTS; nTest++)
50 for (
int nAction=0; nAction<3*
MAX_SIZE; nAction++)
60 int static permute(
int n)
63 static const int table[16] = {0x243F, 0x6A88, 0x85A3, 0x08D3, 0x1319, 0x8A2E, 0x0370, 0x7344,
64 0xA409, 0x3822, 0x299F, 0x31D0, 0x082E, 0xFA98, 0xEC4E, 0x6C89};
67 for (
int bit=0; bit<16; bit++)
83 for (
int m=max(0,n-MAX_SIZE+1); m<=n; m++)
84 tester.insert(permute(m));
86 BOOST_CHECK(mru == tester);
90 BOOST_AUTO_TEST_SUITE_END()
std::pair< iterator, bool > insert(const key_type &x)
BOOST_AUTO_TEST_CASE(mruset_like_set)
size_type max_size() const