Use smart pointers for basic libraries.
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:
@@ -29,7 +29,7 @@ TEST_CASE("Turn ordering: Attack before pass", "[Battling]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Turn ordering: High priority goes before no priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto& l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("standard"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("highPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
@@ -51,7 +51,7 @@ TEST_CASE("Turn ordering: High priority goes before no priority", "[Battling]")
|
||||
}
|
||||
|
||||
TEST_CASE("Turn ordering: Higher priority goes before high priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto& l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("highPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("higherPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
@@ -73,7 +73,7 @@ TEST_CASE("Turn ordering: Higher priority goes before high priority", "[Battling
|
||||
}
|
||||
|
||||
TEST_CASE("Turn ordering: High priority goes before low priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto& l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("lowPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("higherPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
@@ -95,7 +95,7 @@ TEST_CASE("Turn ordering: High priority goes before low priority", "[Battling]")
|
||||
}
|
||||
|
||||
TEST_CASE("Turn ordering: No priority goes before low priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto& l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("lowPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("standard"_cnc), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
|
||||
Reference in New Issue
Block a user