Return optional pointer instead of raw pointers in Pokemon::GetMoves
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:
@@ -28,9 +28,9 @@ TEST_CASE("Get Attack name from Pokemon") {
|
||||
.LearnMove("testMove"_cnc, CreatureLib::Battling::AttackLearnMethod::Level)
|
||||
.LearnMove("testMove2"_cnc, CreatureLib::Battling::AttackLearnMethod::Level)
|
||||
.Build();
|
||||
auto move = mon->GetMoves()[0];
|
||||
auto move = mon->GetMoves()[0].GetValue();
|
||||
REQUIRE(move->GetMoveData()->GetName() == "testMove"_cnc);
|
||||
auto move2 = mon->GetMoves()[1];
|
||||
auto move2 = mon->GetMoves()[1].GetValue();
|
||||
REQUIRE(move2->GetMoveData()->GetName() == "testMove2"_cnc);
|
||||
delete mon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user