From 38873bb99dea8a8089f1056bc1b28a59ed1f83d3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 Jun 2017 19:56:05 +0300 Subject: Move virtual methods from Being constructor to postInit. --- src/utils/chatutils_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/utils') diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc index f6e608556..cbe87da9d 100644 --- a/src/utils/chatutils_unittest.cc +++ b/src/utils/chatutils_unittest.cc @@ -132,7 +132,7 @@ TEST_CASE("chatutils replaceVars", "") SECTION("player") { - Being *player1 = new Being(static_cast(2), + Being *player1 = Being::createBeing(static_cast(2), ActorType::Player, BeingTypeId_zero, nullptr); @@ -147,7 +147,7 @@ TEST_CASE("chatutils replaceVars", "") SECTION("monster") { - Being *const monster = new Being(static_cast(3), + Being *const monster = Being::createBeing(static_cast(3), ActorType::Monster, BeingTypeId_zero, nullptr); @@ -167,7 +167,7 @@ TEST_CASE("chatutils replaceVars", "") replaceVars(str); REQUIRE(str == "test "); - Being *const player1 = new Being(static_cast(2), + Being *const player1 = Being::createBeing(static_cast(2), ActorType::Player, BeingTypeId_zero, nullptr); @@ -178,7 +178,7 @@ TEST_CASE("chatutils replaceVars", "") replaceVars(str); REQUIRE(str == "test player1"); - Being *const player2 = new Being(static_cast(4), + Being *const player2 = Being::createBeing(static_cast(4), ActorType::Player, BeingTypeId_zero, nullptr); @@ -203,7 +203,7 @@ TEST_CASE("chatutils replaceVars", "") replaceVars(str); REQUIRE(str == "test "); - Being *const player1 = new Being(static_cast(2), + Being *const player1 = Being::createBeing(static_cast(2), ActorType::Player, BeingTypeId_zero, nullptr); @@ -215,7 +215,7 @@ TEST_CASE("chatutils replaceVars", "") replaceVars(str); REQUIRE(str == "test player1"); - Being *const player2 = new Being(static_cast(4), + Being *const player2 = Being::createBeing(static_cast(4), ActorType::Player, BeingTypeId_zero, nullptr); @@ -229,7 +229,7 @@ TEST_CASE("chatutils replaceVars", "") Party *const party2 = Party::getParty(2); - Being *const player3 = new Being(static_cast(5), + Being *const player3 = Being::createBeing(static_cast(5), ActorType::Player, BeingTypeId_zero, nullptr); -- cgit v1.2.3-70-g09d2