1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

tests: attempt to fix build without lua

This commit is contained in:
Konstantin
2023-04-25 22:24:10 +03:00
committed by Konstantin P
parent f03819fba2
commit 2a8f9629ae
11 changed files with 55 additions and 6 deletions

View File

@@ -19,7 +19,9 @@
#include "mock/mock_BonusBearer.h"
#include "mock/mock_battle_IBattleState.h"
#include "mock/mock_battle_Unit.h"
#if SCRIPTING_ENABLED
#include "mock/mock_scripting_Pool.h"
#endif
using namespace battle;
using namespace testing;
@@ -122,11 +124,16 @@ public:
{
public:
#if SCRIPTING_ENABLED
scripting::Pool * pool;
TestSubject(scripting::Pool * p)
: CBattleInfoCallback(),
pool(p)
#else
TestSubject()
: CBattleInfoCallback()
#endif
{
}
@@ -135,13 +142,17 @@ public:
CBattleInfoCallback::setBattle(battleInfo);
}
#if SCRIPTING_ENABLED
scripting::Pool * getContextPool() const override
{
return pool;
}
#endif
};
#if SCRIPTING_ENABLED
StrictMock<scripting::PoolMock> pool;
#endif
TestSubject subject;
@@ -149,8 +160,10 @@ public:
UnitsFake unitsFake;
CBattleInfoCallbackTest()
#if SCRIPTING_ENABLED
: pool(),
subject(&pool)
#endif
{
}