TEST(MapTest, isBadIDReturnsWhenIndexIsOutOfRange) { IMap* map = new Map(IVector2D(10, 10)); EXPECT_EQ(-1, map->getIndividualID(IVector2D(10, 0))); EXPECT_EQ(-1, map->getIndividualID(IVector2D(0, 10))); EXPECT_EQ(-1, map->getIndividualID(IVector2D(10, 10))); }
TEST(MapTest, canSetIndividualID) { IMap* map = new Map(IVector2D(10, 10)); map->setIndividualID(IVector2D(0, 0), 1); ASSERT_EQ(1, map->getIndividualID(IVector2D(0, 0))); }
TEST(MapTest, byDefaultFirstCellHasNoIndividuals) { IMap* map = new Map(IVector2D(10, 10)); ASSERT_EQ(0, map->getIndividualID(IVector2D(0, 0))); }