1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Tweak tests

This commit is contained in:
AlexVinS 2016-02-21 22:17:18 +03:00
parent a4b6d34ebe
commit 15a4a11560

View File

@ -59,6 +59,12 @@ void checkEqual(const std::set<Element> & actual, const std::set<Element> & expe
}
}
void checkEqual(const SHeroName & actual, const SHeroName & expected)
{
VCMI_CHECK_FIELD_EQUAL(heroId);
VCMI_CHECK_FIELD_EQUAL(heroName);
}
void checkEqual(const PlayerInfo & actual, const PlayerInfo & expected)
{
VCMI_CHECK_FIELD_EQUAL(canHumanPlay);
@ -73,14 +79,13 @@ void checkEqual(const PlayerInfo & actual, const PlayerInfo & expected)
VCMI_CHECK_FIELD_EQUAL(mainCustomHeroId);
//todo:heroesNames
checkEqual(actual.heroesNames, expected.heroesNames);
VCMI_CHECK_FIELD_EQUAL(hasMainTown);
VCMI_CHECK_FIELD_EQUAL(generateHeroAtMainTown);
VCMI_CHECK_FIELD_EQUAL(posOfMainTown);
VCMI_CHECK_FIELD_EQUAL(team);
VCMI_CHECK_FIELD_EQUAL(hasRandomHero);
}
void checkEqual(const EventExpression & actual, const EventExpression & expected)
@ -142,6 +147,8 @@ void MapComparer::compareHeader()
VCMI_CHECK_FIELD_EQUAL_P(victoryIconIndex);
VCMI_CHECK_FIELD_EQUAL_P(defeatIconIndex);
VCMI_CHECK_FIELD_EQUAL_P(howManyTeams);
checkEqual(actual->players, expected->players);
checkEqual(actual->allowedHeroes, expected->allowedHeroes);