예제 #1
0
TEST(VQueueTest, Initialize) {
  VQueue* q = new VQueue();

  EXPECT_EQ(0, q->size());
  EXPECT_EQ(1, q->isEmpty());
  delete q;
}
예제 #2
0
TEST(VQueueTest, Size) {
  VQueue* q = new VQueue();
  
  EXPECT_EQ(0, q->size());

  q->enqueue(5);
  q->enqueue(10);
  q->enqueue(15);

  EXPECT_EQ(3, q->size());

  q->dequeue();

  EXPECT_EQ(2, q->size());

  delete q;
}
예제 #3
0
TEST(VQueueTest, Enqueue) {
  VQueue* q = new VQueue();
  q->enqueue(5);

  EXPECT_EQ(0, q->isEmpty());
  EXPECT_EQ(1, q->size());
  EXPECT_EQ(5, q->dequeue());
  delete q;
}