mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 22:35:42 +00:00
Keep command factory test flatbuffers alive (#6794)
This commit is contained in:
+2
-2
@@ -15,7 +15,6 @@ class FleeCommandFactoryTests : public ::testing::Test {
|
||||
InitializeGameSettings();
|
||||
GetGameSettingsSetter().SetInt(kSettingsKeys.fleeActionPointCost, 5);
|
||||
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
fbb.ForceDefaults(true);
|
||||
|
||||
auto noProfession = net::eagle0::shardok::storage::fb::ProfessionSpecificInfo(
|
||||
@@ -67,6 +66,7 @@ public:
|
||||
Unit* anotherAttacker;
|
||||
Unit* defender;
|
||||
const Units* allUnits;
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
HexMap* hexMap;
|
||||
vector<PlayerId> allyPids{1};
|
||||
int remainingActionPoints = 9;
|
||||
@@ -301,4 +301,4 @@ TEST_F(FleeCommandFactoryTests, cannotBecomeOutlaw_noOutlawCommand) {
|
||||
/* cannotBecomeOutlaw= */ true);
|
||||
|
||||
EXPECT_EQ(0, commands.size());
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -13,7 +13,6 @@ class MoveCommandFactoryTest : public ::testing::Test {
|
||||
void SetUp() override {
|
||||
InitializeGameSettings();
|
||||
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
auto actorOff = AddGenericUnit(1, 3, position);
|
||||
auto enemyOff = AddGenericUnit(0, 2, Coords(3, 2));
|
||||
|
||||
@@ -36,6 +35,7 @@ public:
|
||||
|
||||
HexMapWrapper hexMap = BASIC_MAP_FB;
|
||||
const Units* units;
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
vector<PlayerId> allyPids{};
|
||||
const UnitId nextUnitId = 37;
|
||||
|
||||
@@ -59,4 +59,4 @@ TEST_F(MoveCommandFactoryTest, inZoc_costsExtra) {
|
||||
});
|
||||
|
||||
EXPECT_EQ(5, moveAwayCommand->GetCommandProto().action_points().value());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,6 @@ class ArcheryCommandFactoryTest : public ::testing::Test {
|
||||
GetGameSettingsSetter().SetDouble(kSettingsKeys.minimumVigorToAct, 15);
|
||||
GetGameSettingsSetter().SetInt(kSettingsKeys.longbowWindBonusRangeMinSpeed, 20);
|
||||
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
fbb.ForceDefaults(true);
|
||||
|
||||
auto noProfession = net::eagle0::shardok::storage::fb::ProfessionSpecificInfo(
|
||||
@@ -87,6 +86,7 @@ public:
|
||||
HexMapWrapper hexMap;
|
||||
int remainingActionPoints = 9;
|
||||
const Units* units;
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
vector<PlayerId> allyPids{};
|
||||
|
||||
std::shared_ptr<ArcheryCommandFactory> factory = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user