Changes for EffectParameter type in AngelScript, fixes for ConstString memory leak in AngelScript.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-16 14:25:20 +02:00
parent 2ab9445b71
commit c11da2d966
8 changed files with 105 additions and 64 deletions

View File

@@ -148,9 +148,10 @@ TEST_CASE("Able to set and get evolution", "library") {
auto evolutions = species->GetEvolutions();
REQUIRE(evolutions.size() == 1);
auto evo = evolutions[0];
CHECK(evo.GetMethod() == PkmnLib::Library::EvolutionMethod::Level);
CHECK(evo.GetNewSpecies() == species2);
CHECK(std::any_cast<uint8_t>(evo.GetData(0)) == 16);
CHECK(evo->GetMethod() == PkmnLib::Library::EvolutionMethod::Level);
CHECK(evo->GetNewSpecies() == species2);
INFO(CreatureLib::Library::EffectParameterTypeHelper::ToString(evo->GetData(0)->GetType()));
CHECK(evo->GetData(0)->AsInt() == 16);
delete species;
delete species2;