Exemplo n.º 1
0
TEST(VQueueTest, IsEmpty) {
  VQueue* q = new VQueue();
  
  EXPECT_EQ(1, q->isEmpty());

  q->enqueue(1);

  EXPECT_EQ(0, q->isEmpty());
  delete q;
}
Exemplo n.º 2
0
TEST(VQueueTest, Initialize) {
  VQueue* q = new VQueue();

  EXPECT_EQ(0, q->size());
  EXPECT_EQ(1, q->isEmpty());
  delete q;
}
Exemplo n.º 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;
}