Fixes Pokemon::get_Nickname in angelscript.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -187,20 +187,21 @@ TEST_CASE("Validate Pokemon CurrentHealth in Script") {
|
||||
}
|
||||
|
||||
TEST_CASE("Validate Pokemon Nickname in Script") {
|
||||
// auto mainLib = TestLibrary::GetLibrary();
|
||||
// auto data = GetScript(mainLib, "testNickname"_cnc);
|
||||
//
|
||||
// auto mon = PkmnLib::Battling::CreatePokemon(mainLib, "testSpecies"_cnc, 30)
|
||||
// .WithForme("default"_cnc)
|
||||
// .WithGender(CreatureLib::Library::Gender::Male)
|
||||
// .Build();
|
||||
// data.Context->SetArgObject(0, (void*)mon);
|
||||
// auto name = std::string(mon->GetNickname());
|
||||
// data.Context->SetArgAddress(1, &name);
|
||||
//
|
||||
// REQUIRE(data.Context->Execute() == asEXECUTION_FINISHED);
|
||||
// REQUIRE((bool)data.Context->GetReturnWord());
|
||||
// delete mon;
|
||||
auto mainLib = TestLibrary::GetLibrary();
|
||||
auto data = GetScript(mainLib, "testNickname"_cnc);
|
||||
|
||||
auto mon = PkmnLib::Battling::CreatePokemon(mainLib, "testSpecies"_cnc, 30)
|
||||
.WithForme("default"_cnc)
|
||||
.WithGender(CreatureLib::Library::Gender::Male)
|
||||
.WithNickname("foobar")
|
||||
.Build();
|
||||
data.Context->SetArgObject(0, (void*)mon);
|
||||
auto name = std::string(mon->GetNickname().value());
|
||||
data.Context->SetArgAddress(1, &name);
|
||||
|
||||
REQUIRE(data.Context->Execute() == asEXECUTION_FINISHED);
|
||||
REQUIRE((bool)data.Context->GetReturnWord());
|
||||
delete mon;
|
||||
}
|
||||
|
||||
TEST_CASE("Validate Pokemon Active Ability in Script") {
|
||||
|
||||
Reference in New Issue
Block a user