diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-08 19:37:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-08 19:37:48 +0300 |
commit | c8007693768d599726119b89cff5ab6aa1cf000d (patch) | |
tree | 0beda4b49c5c30a254046d2cba9b54e983e0eb58 /src/utils | |
parent | 661ae1c08d0cab92011e1913e587901c51aee5fe (diff) | |
download | manaplus-c8007693768d599726119b89cff5ab6aa1cf000d.tar.gz manaplus-c8007693768d599726119b89cff5ab6aa1cf000d.tar.bz2 manaplus-c8007693768d599726119b89cff5ab6aa1cf000d.tar.xz manaplus-c8007693768d599726119b89cff5ab6aa1cf000d.zip |
Fix code style.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/chatutils_unittest.cc | 16 | ||||
-rw-r--r-- | src/utils/timer_unittest.cc | 6 |
2 files changed, 12 insertions, 10 deletions
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<BeingId>(3), + Being *const monster = new Being(static_cast<BeingId>(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<BeingId>(2), + Being *const player1 = new Being(static_cast<BeingId>(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<BeingId>(4), + Being *const player2 = new Being(static_cast<BeingId>(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 <PARTY>"; replaceVars(str); REQUIRE(str == "test "); - Being *player1 = new Being(static_cast<BeingId>(2), + Being *const player1 = new Being(static_cast<BeingId>(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<BeingId>(4), + Being *const player2 = new Being(static_cast<BeingId>(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<BeingId>(5), + Being *const player3 = new Being(static_cast<BeingId>(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") |