Ejemplo n.º 1
0
    void test_end()
    {
        queue_type::iterator it;
        size_t count = 0, num = 10;

        fill(num);
        for (it = m_queue.begin(); it != m_queue.end(); ++it)
            count++;
        clear();

        ASSERT_EQ(m_max_priority*num, count);
    }
Ejemplo n.º 2
0
    void test_clear()
    {
        size_t num = 10, count = 0;
        queue_type::iterator it;

        fill(num);
        m_queue.clear();
        for (it = m_queue.begin(); it != m_queue.end(); it++)
            count++;
        clear();

        ASSERT_EQ(0, count);
    }
Ejemplo n.º 3
0
    void test_sequence()
    {
        size_t num = 10;

        fill(num);
        queue_type::iterator it(m_queue.begin());
        for (size_t i = 0; i < m_max_priority; ++i) {
            for (size_t j = 0; j < num; ++j) {
                ASSERT_EQ(j, *it);
                it++;
            }
        }
        clear();
    }