BOOST_AUTO_TEST_CASE_TEMPLATE( testClear_manyItems, DPQ, both )
{
    DPQ dpq;
    typedef typename DPQ::Index Index;

    for( int i( 0 ); i < 70000; ++i )
    {
        dpq.push( i );
    }

    BOOST_CHECK( dpq.check() );

    dpq.clear();

    BOOST_CHECK( dpq.isEmpty() );
    BOOST_CHECK( dpq.check() );

    dpq.push( 2 );
    dpq.push( 20 );
    dpq.push( 30 );

    BOOST_CHECK_EQUAL( Index( 3 ), dpq.getSize() );

    dpq.clear();

    BOOST_CHECK( dpq.isEmpty() );
    BOOST_CHECK( dpq.check() );
}
    void testClearManyItems()
    {
        DPQ dpq;
        typedef typename DPQ::Index Index;

        for( int i( 0 ); i < 70000; ++i )
        {
            dpq.push( i );
        }

        BOOST_CHECK( dpq.checkConsistency() );

        dpq.clear();

        BOOST_CHECK( dpq.isEmpty() );
        BOOST_CHECK( dpq.checkConsistency() );

        dpq.push( 2 );
        dpq.push( 20 );
        dpq.push( 30 );

        BOOST_CHECK_EQUAL( Index( 3 ), dpq.getSize() );

        dpq.clear();

        BOOST_CHECK( dpq.isEmpty() );
        BOOST_CHECK( dpq.checkConsistency() );
    }
BOOST_AUTO_TEST_CASE_TEMPLATE( testClear, DPQ, both )
{
    DPQ dpq;
    typedef typename DPQ::Index Index;

    dpq.push( 1 );
    dpq.push( 20 );
    dpq.push( 50 );

    BOOST_CHECK_EQUAL( Index( 3 ), dpq.getSize() );

    dpq.clear();

    BOOST_CHECK( dpq.isEmpty() );
    BOOST_CHECK( dpq.check() );

    dpq.push( 2 );
    dpq.push( 20 );
    dpq.push( 30 );

    BOOST_CHECK_EQUAL( Index( 3 ), dpq.getSize() );

    dpq.clear();

    BOOST_CHECK( dpq.isEmpty() );
    BOOST_CHECK( dpq.check() );
}
    void testClear()
    {
        DPQ dpq;

        dpq.push( 1 );
        dpq.push( 20 );
        dpq.push( 50 );

        BOOST_CHECK_EQUAL( Index( 3 ), dpq.getSize() );

        dpq.clear();

        BOOST_CHECK( dpq.isEmpty() );
        BOOST_CHECK( dpq.checkConsistency() );

        dpq.push( 2 );
        dpq.push( 20 );
        dpq.push( 30 );

        BOOST_CHECK_EQUAL( Index( 3 ), dpq.getSize() );

        dpq.clear();

        BOOST_CHECK( dpq.isEmpty() );
        BOOST_CHECK( dpq.checkConsistency() );
    }