Reworks test suite, tweaks to Cmake config for Windows.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-12-07 13:45:44 +01:00
parent 8897f2282f
commit 0483e635ea
10 changed files with 90 additions and 68 deletions

View File

@@ -5,13 +5,13 @@
#include "../../src/Battling/Models/CreateCreature.hpp"
#include "../../src/Battling/TurnChoices/AttackTurnChoice.hpp"
#include "../../src/Battling/TurnChoices/PassTurnChoice.hpp"
#include "../TestLibrary/TestLibrary.cpp"
#include "../TestLibrary/TestLibrary.hpp"
using namespace CreatureLib;
using namespace Battling;
TEST_CASE("Create Party", "[Integrations]") {
auto library = GetLibrary();
auto library = TestLibrary::Get();
auto c1 = CreateCreature(library, "testSpecies1", 50).WithAttack("standard", AttackLearnMethod::Unknown)->Create();
CreatureParty party1{c1};
auto battleParty = BattleParty(&party1, {CreatureIndex(0, 0)});
@@ -19,7 +19,7 @@ TEST_CASE("Create Party", "[Integrations]") {
}
TEST_CASE("Create Battle", "[Integrations]") {
auto library = GetLibrary();
auto library = TestLibrary::Get();
auto c1 = CreateCreature(library, "testSpecies1", 50).WithAttack("standard", AttackLearnMethod::Unknown)->Create();
CreatureParty party1{c1};
auto battleParty1 = BattleParty(&party1, {CreatureIndex(0, 0)});
@@ -31,7 +31,7 @@ TEST_CASE("Create Battle", "[Integrations]") {
}
TEST_CASE("Use damaging move", "[Integrations]") {
auto library = GetLibrary();
auto library = TestLibrary::Get();
auto c1 = CreateCreature(library, "testSpecies1", 50).WithAttack("standard", AttackLearnMethod::Unknown)->Create();
CreatureParty party1{c1};
auto battleParty1 = BattleParty(&party1, {CreatureIndex(0, 0)});
@@ -41,8 +41,8 @@ TEST_CASE("Use damaging move", "[Integrations]") {
auto battle = Battle(library, {battleParty1, battleParty2});
battle.FillEmptySlot(0, 0, c1);
battle.FillEmptySlot(1, 0, c2);
battle.SwitchCreature(0, 0, c1);
battle.SwitchCreature(1, 0, c2);
battle.TrySetChoice(new AttackTurnChoice(c1, c1->GetAttacks()[0], CreatureIndex(1, 0)));
battle.TrySetChoice(new PassTurnChoice(c2));