Compare commits

..
Author SHA1 Message Date
admin 5c70807986 Use direct vector declarations in bridge factory tests 2026-06-23 13:07:15 -07:00
14 changed files with 14 additions and 14 deletions
@@ -29,7 +29,7 @@ class BlowBridgeCommandFactoryTests : public ::testing::Test {
auto engOff = AddGenericUnit(1, 0, bridgePosition);
auto otherOff = AddGenericUnit(2, 1, adjacentOccupied);
auto units_vec = vector<Unit>{engOff, otherOff};
vector<Unit> units_vec{engOff, otherOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&units_vec);
auto mapOff = AddBasicMap(fbb);
@@ -20,7 +20,7 @@ class BuildBridgeCommandFactoryTests : public ::testing::Test {
fbb.ForceDefaults(true);
const auto engOff = AddGenericUnit(1, 0, position);
auto unitsVec = vector<Unit>{engOff};
vector<Unit> unitsVec{engOff};
const auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
fbb.Finish(unitsOff);
@@ -23,7 +23,7 @@ class FearCommandFactoryTests : public ::testing::Test {
auto necroOff = AddGenericUnit(1, 0, position);
auto targetOff = AddGenericUnit(5, 1, adjacentPosition);
auto unitsVec = vector<Unit>{necroOff, targetOff};
vector<Unit> unitsVec{necroOff, targetOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);
@@ -43,7 +43,7 @@ class HolyWaveCommandFactoryTests : public ::testing::Test {
auto actorOff = AddGenericUnit(1, 0, position);
auto otherOff = AddGenericUnit(5, 1, Coords(5, 5));
auto unitsVec = vector<Unit>{actorOff, otherOff};
vector<Unit> unitsVec{actorOff, otherOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);
@@ -34,7 +34,7 @@ class ExtinguishFireCommandTests : public ::testing::Test {
fbb.ForceDefaults(true);
auto actorOff = AddGenericUnit(0, 0, Coords(3, 2));
vector<Unit> unitsVec{actorOff};
auto unitsVec = vector<Unit>{actorOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddHexMap(fbb, BASIC_MAP_FB);
@@ -26,7 +26,7 @@ class FearCommandTest : public ::testing::Test {
auto actorOff = AddGenericUnit(5, 0, position);
auto victimOff = AddGenericUnit(4, 1, target);
vector<Unit> unitsVec{actorOff, victimOff};
auto unitsVec = vector<Unit>{actorOff, victimOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);
@@ -19,7 +19,7 @@ class FortifyCommandTest : public ::testing::Test {
fbb.ForceDefaults(true);
auto engOff = AddGenericUnit(5, 0, Coords(2, 2));
vector<Unit> unitsVec{engOff};
auto unitsVec = vector<Unit>{engOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -35,7 +35,7 @@ class FreezeWaterCommandTest : public ::testing::Test {
auto undeadOff = AddGenericUndead(4, 1, target);
vector<Unit> unitsVec{mageOff, undeadOff};
auto unitsVec = vector<Unit>{mageOff, undeadOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -28,7 +28,7 @@ class HideCommandTests : public ::testing::Test {
auto rangerOff = AddGenericUnit(rangerPid, 0, position);
auto anotherOff = AddGenericUnit(anotherPid, 1, Coords(5, 5));
vector<Unit> unitsVec{rangerOff, anotherOff};
auto unitsVec = vector<Unit>{rangerOff, anotherOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -20,7 +20,7 @@ class MeteorCancelCommandTest : public ::testing::Test {
fbb.ForceDefaults(true);
auto casterOff = AddGenericUnit(5, 0, Coords(5, 5));
vector<Unit> unitsVec{casterOff};
auto unitsVec = vector<Unit>{casterOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -22,7 +22,7 @@ class MeteorStartCommandTest : public ::testing::Test {
fbb.ForceDefaults(true);
auto casterOff = AddGenericUnit(5, 0, Coords(5, 5));
vector<Unit> unitsVec{casterOff};
auto unitsVec = vector<Unit>{casterOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -23,7 +23,7 @@ class MeteorTargetCommandTest : public ::testing::Test {
auto casterOff = AddGenericUnit(5, 0, Coords(5, 5));
vector<Unit> unitsVec{casterOff};
auto unitsVec = vector<Unit>{casterOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -26,7 +26,7 @@ class RepairCommandTest : public ::testing::Test {
auto engOff = AddGenericUnit(1, 0, Coords(2, 2));
vector<Unit> unitsVec{engOff};
auto unitsVec = vector<Unit>{engOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);
@@ -29,7 +29,7 @@ class StartFireCommandTests : public ::testing::Test {
fbb.ForceDefaults(true);
actor = AddGenericUnit(0, 0, Coords(2, 3));
std::vector<Unit> unitsVec{actor};
auto unitsVec = std::vector<Unit>{actor};
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto hexMap = AddHexMap(fbb, BASIC_MAP_FB);