tests/queue_test.cpp
/**
 * Tests if queue will be empty after all elements are popped.
 */
Tests if queue will be empty after all elements are popped.
Tests if queue will be empty after all elements are popped .
TEST(QueueTest, QueuePopEmpty) {
    Queue *queue = init_queue(100);
    for (int i = 0; i < 10; i++) {
        queue_push(queue, i);
    }
    for (int i = 0; i < 10; i++) {
        int result = 0;
        queue_pop(queue, &result);
    }
    EXPECT_EQ(queue_empty(queue), QUEUE_EMPTY);
}
TEST ( QueueTest , QueuePopEmpty ) { Queue * queue = init_queue ( 100 ) ; for ( int i = 0 ; i < 10 ; i ++ ) { queue_push ( queue , i ) ; } for ( int i = 0 ; i < 10 ; i ++ ) { int result = 0 ; queue_pop ( queue , & result ) ; } EXPECT_EQ ( queue_empty ( queue ) , QUEUE_EMPTY ) ; }
Tests if queue will be empty after all elements are popped.
Tests if queue will be empty after all elements are popped .