From 924b456b0f0938249056b231a5a6824fd78aa39e Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 13 Mar 2023 17:41:07 +0300 Subject: [PATCH] vcmi: fix unit tests for latest develop --- test/mock/mock_IGameCallback.h | 2 +- test/mock/mock_MapService.cpp | 4 ++-- test/mock/mock_MapService.h | 4 ++-- test/mock/mock_battle_Unit.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/mock/mock_IGameCallback.h b/test/mock/mock_IGameCallback.h index 669bbbd13..98549d070 100644 --- a/test/mock/mock_IGameCallback.h +++ b/test/mock/mock_IGameCallback.h @@ -82,7 +82,7 @@ public: void setMovePoints(SetMovePoints * smp) override {} void setManaPoints(ObjectInstanceID hid, int val) override {} void giveHero(ObjectInstanceID id, PlayerColor player) override {} - void changeObjPos(ObjectInstanceID objid, int3 newPos, ui8 flags) override {} + void changeObjPos(ObjectInstanceID objid, int3 newPos) override {} void heroExchange(ObjectInstanceID hero1, ObjectInstanceID hero2) override {} //when two heroes meet on adventure map void changeFogOfWar(int3 center, ui32 radius, PlayerColor player, bool hide) override {} void changeFogOfWar(std::unordered_set &tiles, PlayerColor player, bool hide) override {} diff --git a/test/mock/mock_MapService.cpp b/test/mock/mock_MapService.cpp index df9bd1297..1b85b9edf 100644 --- a/test/mock/mock_MapService.cpp +++ b/test/mock/mock_MapService.cpp @@ -65,12 +65,12 @@ std::unique_ptr MapServiceMock::loadMapHeader(const ResourceID & nam return initialLoader.loadMapHeader(); } -std::unique_ptr MapServiceMock::loadMap(const ui8 * buffer, int size, const std::string & name) const +std::unique_ptr MapServiceMock::loadMap(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const { return loadMap(); } -std::unique_ptr MapServiceMock::loadMapHeader(const ui8 * buffer, int size, const std::string & name) const +std::unique_ptr MapServiceMock::loadMapHeader(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const { initialBuffer.seek(0); CMapLoaderJson initialLoader(&initialBuffer); diff --git a/test/mock/mock_MapService.h b/test/mock/mock_MapService.h index 90e81162c..656b3c771 100644 --- a/test/mock/mock_MapService.h +++ b/test/mock/mock_MapService.h @@ -31,8 +31,8 @@ public: std::unique_ptr loadMap(const ResourceID & name) const override; std::unique_ptr loadMapHeader(const ResourceID & name) const override; - std::unique_ptr loadMap(const ui8 * buffer, int size, const std::string & name) const override; - std::unique_ptr loadMapHeader(const ui8 * buffer, int size, const std::string & name) const override; + std::unique_ptr loadMap(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const override; + std::unique_ptr loadMapHeader(const ui8 * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const override; void saveMap(const std::unique_ptr & map, boost::filesystem::path fullPath) const override; diff --git a/test/mock/mock_battle_Unit.h b/test/mock/mock_battle_Unit.h index e8ed71f0f..4d88a890e 100644 --- a/test/mock/mock_battle_Unit.h +++ b/test/mock/mock_battle_Unit.h @@ -77,7 +77,7 @@ public: MOCK_CONST_METHOD1(willMove, bool(int)); MOCK_CONST_METHOD1(waited, bool(int)); - MOCK_CONST_METHOD1(battleQueuePhase, int(int)); + MOCK_CONST_METHOD1(battleQueuePhase, battle::BattlePhases::Type(int)); MOCK_CONST_METHOD0(acquire, std::shared_ptr()); MOCK_CONST_METHOD0(acquireState, std::shared_ptr());