Merge Core library into Library, as with its utility functionality merged into Arbutils, it's becoming less and less useful.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-03-22 10:11:53 +01:00
parent 5672f2d2a7
commit a7b87ab4f8
28 changed files with 162 additions and 174 deletions

View File

@@ -1,7 +1,7 @@
#ifdef TESTS_BUILD
#include <cstring>
#include "../extern/catch.hpp"
#include "../src/Core/Exceptions/CreatureException.hpp"
#include "../src/Library/Exceptions/CreatureException.hpp"
TEST_CASE("When throwing exception, what() is readable", "[Utilities]") {
bool hasCaught = false;

View File

@@ -205,8 +205,8 @@ TEST_CASE("Switch Creature in, but have attack aimed at it. Attack should hit ne
battle.TrySetChoice(new SwitchTurnChoice(c1, c2));
battle.TrySetChoice(new AttackTurnChoice(c3, c3->GetAttacks()[0], CreatureIndex(0, 0)));
REQUIRE(c2->GetCurrentHealth() < c2->GetBoostedStat(Core::Statistic::Health));
REQUIRE(c1->GetCurrentHealth() == c1->GetBoostedStat(Core::Statistic::Health));
REQUIRE(c2->GetCurrentHealth() < c2->GetBoostedStat(Library::Statistic::Health));
REQUIRE(c1->GetCurrentHealth() == c1->GetBoostedStat(Library::Statistic::Health));
}
TEST_CASE("Switch Creature in, mark as seen opponent for opponent", "[Integrations]") {

View File

@@ -41,8 +41,8 @@ TEST_CASE("Get creature nickname when unset", "[Library]") {
TEST_CASE("Increase creature stat boost", "[Library]") {
auto library = TestLibrary::Get();
auto creature = CreateCreature(library, "testSpecies1", 1).Create();
creature->ChangeStatBoost(CreatureLib::Core::Statistic::PhysicalAttack, 6);
REQUIRE(creature->GetStatBoost(CreatureLib::Core::Statistic::PhysicalAttack) == 6);
creature->ChangeStatBoost(CreatureLib::Library::Statistic::PhysicalAttack, 6);
REQUIRE(creature->GetStatBoost(CreatureLib::Library::Statistic::PhysicalAttack) == 6);
delete creature;
}

View File

@@ -3,7 +3,6 @@
#include "TestLibrary.hpp"
#include "../../src/Library/GrowthRates/LookupGrowthRate.hpp"
using namespace CreatureLib::Core;
using namespace CreatureLib::Library;
using namespace CreatureLib::Battling;
BattleLibrary* TestLibrary::_library = nullptr;

View File

@@ -5,7 +5,6 @@
#include "../../src/Battling/Library/BattleLibrary.hpp"
using namespace CreatureLib::Core;
using namespace CreatureLib::Library;
using namespace CreatureLib::Battling;