TEST(GetSecondLast, NonEmpty) { History history; std::vector<CorrelationAircraft> aircraft; time_t timestamp; Snapshot snapshot = Snapshot(&aircraft, timestamp); history.AddSnapshot(&snapshot); EXPECT_EQ(history.GetLast(), &snapshot); }
TEST(GetLast, Empty) { History history; EXPECT_EQ(NULL, history.GetLast()); }