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:
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user