src/base/circular_queue.test.cc
/**
 * Testing a full loop, which is incrementing one iterator until
 * it wraps and has the same index as the starting iterator.
 * This test checks that even if they have the same index, they are
 * not the same iterator since they have different round.
 */
Testing a full loop, which is incrementing one iterator until
it wraps and has the same index as the starting iterator.
This test checks that even if they have the same index, they are
not the same iterator since they have different round.
Testing a full loop which is incrementing one iterator until it wraps and has the same index as the starting iterator . This test checks that even if they have the same index they are not the same iterator since they have different round .
TEST(CircularQueueTest, FullLoop)
{
    const auto cq_size = 8;
    CircularQueue<uint32_t> cq(cq_size);
    auto starting_it = cq.begin();
    auto ending_it = starting_it + cq_size;
    ASSERT_EQ(ending_it - starting_it, cq_size);
    ASSERT_TRUE(starting_it != ending_it);
}
TEST ( CircularQueueTest , FullLoop ) { const auto cq_size = 8 ; CircularQueue < uint32_t > cq ( cq_size ) ; auto starting_it = cq . begin ( ) ; auto ending_it = starting_it + cq_size ; ASSERT_EQ ( ending_it - starting_it , cq_size ) ; ASSERT_TRUE ( starting_it != ending_it ) ; }
Testing a full loop, which is incrementing one iterator until
 it wraps and has the same index as the starting iterator.
Testing a full loop which is incrementing one iterator until it wraps and has the same index as the starting iterator .
// ending_it does a full loop and points at the same // index as starting_it but with a different round