From c8007693768d599726119b89cff5ab6aa1cf000d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 8 Apr 2016 19:37:48 +0300 Subject: Fix code style. --- src/utils/chatutils_unittest.cc | 16 ++++++++-------- src/utils/timer_unittest.cc | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src/utils') diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc index 31889b76c..74a62c811 100644 --- a/src/utils/chatutils_unittest.cc +++ b/src/utils/chatutils_unittest.cc @@ -88,7 +88,7 @@ TEST_CASE("chatutils replaceVars") SECTION("monster") { - Being *monster = new Being(static_cast(3), + Being *const monster = new Being(static_cast(3), ActorType::Monster, BeingTypeId_zero, nullptr); @@ -110,7 +110,7 @@ TEST_CASE("chatutils replaceVars") replaceVars(str); REQUIRE(str == "test "); - Being *player1 = new Being(static_cast(2), + Being *const player1 = new Being(static_cast(2), ActorType::Player, BeingTypeId_zero, nullptr); @@ -121,7 +121,7 @@ TEST_CASE("chatutils replaceVars") replaceVars(str); REQUIRE(str == "test player1"); - Being *player2 = new Being(static_cast(4), + Being *const player2 = new Being(static_cast(4), ActorType::Player, BeingTypeId_zero, nullptr); @@ -139,14 +139,14 @@ TEST_CASE("chatutils replaceVars") { actorManager->mActors.insert(localPlayer); - Party *party1 = Party::getParty(1); + Party *const party1 = Party::getParty(1); localPlayer->setParty(party1); str = "test "; replaceVars(str); REQUIRE(str == "test "); - Being *player1 = new Being(static_cast(2), + Being *const player1 = new Being(static_cast(2), ActorType::Player, BeingTypeId_zero, nullptr); @@ -158,7 +158,7 @@ TEST_CASE("chatutils replaceVars") replaceVars(str); REQUIRE(str == "test player1"); - Being *player2 = new Being(static_cast(4), + Being *const player2 = new Being(static_cast(4), ActorType::Player, BeingTypeId_zero, nullptr); @@ -170,9 +170,9 @@ TEST_CASE("chatutils replaceVars") replaceVars(str); REQUIRE(str == "test player1,player2"); - Party *party2 = Party::getParty(2); + Party *const party2 = Party::getParty(2); - Being *player3 = new Being(static_cast(5), + Being *const player3 = new Being(static_cast(5), ActorType::Player, BeingTypeId_zero, nullptr); diff --git a/src/utils/timer_unittest.cc b/src/utils/timer_unittest.cc index 3855d6e70..c7fc2a275 100644 --- a/src/utils/timer_unittest.cc +++ b/src/utils/timer_unittest.cc @@ -51,13 +51,15 @@ TEST_CASE("timer get_elapsed_time") tick_time = 10; REQUIRE(get_elapsed_time(0) == 10 * MILLISECONDS_IN_A_TICK); REQUIRE(get_elapsed_time(10) == 0 * MILLISECONDS_IN_A_TICK); - REQUIRE(get_elapsed_time(MAX_TICK_VALUE - 1) == 11 * MILLISECONDS_IN_A_TICK); + REQUIRE(get_elapsed_time(MAX_TICK_VALUE - 1) == + 11 * MILLISECONDS_IN_A_TICK); tick_time = 10000; REQUIRE(get_elapsed_time(0) == 10000 * MILLISECONDS_IN_A_TICK); REQUIRE(get_elapsed_time(10) == 9990 * MILLISECONDS_IN_A_TICK); REQUIRE(get_elapsed_time(10000) == 0 * MILLISECONDS_IN_A_TICK); - REQUIRE(get_elapsed_time(MAX_TICK_VALUE - 1) == 10001 * MILLISECONDS_IN_A_TICK); + REQUIRE(get_elapsed_time(MAX_TICK_VALUE - 1) == + 10001 * MILLISECONDS_IN_A_TICK); } TEST_CASE("timer get_elapsed_time1") -- cgit v1.2.3-60-g2f50