diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-29 01:20:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-29 01:20:53 +0300 |
commit | 436088e97ae3ee8bcfd0530139579fc62271bbc5 (patch) | |
tree | 9e5a42285d826c37bfc54ac264fbe25ba6ae52d1 /src | |
parent | cfbb335f67a350cf23adb62ee536330312185f58 (diff) | |
download | plus-436088e97ae3ee8bcfd0530139579fc62271bbc5.tar.gz plus-436088e97ae3ee8bcfd0530139579fc62271bbc5.tar.bz2 plus-436088e97ae3ee8bcfd0530139579fc62271bbc5.tar.xz plus-436088e97ae3ee8bcfd0530139579fc62271bbc5.zip |
Fix error and warnings in test compilation.
Diffstat (limited to 'src')
-rw-r--r-- | src/animatedsprite_unittest.cc | 3 | ||||
-rw-r--r-- | src/gui/fonts/textchunklist_unittest.cc | 32 |
2 files changed, 18 insertions, 17 deletions
diff --git a/src/animatedsprite_unittest.cc b/src/animatedsprite_unittest.cc index df9104e31..10994c7f7 100644 --- a/src/animatedsprite_unittest.cc +++ b/src/animatedsprite_unittest.cc @@ -30,13 +30,14 @@ #include "resources/sdlimagehelper.h" #include "resources/spriteaction.h" +#include "utils/env.h" #include "utils/physfstools.h" #include "debug.h" TEST_CASE("AnimatedSprite tests", "animatedsprite") { - Client::setEnv("SDL_VIDEODRIVER", "dummy"); + setEnv("SDL_VIDEODRIVER", "dummy"); client = new Client; PHYSFS_init("manaplus"); diff --git a/src/gui/fonts/textchunklist_unittest.cc b/src/gui/fonts/textchunklist_unittest.cc index f245af664..e5994b5b6 100644 --- a/src/gui/fonts/textchunklist_unittest.cc +++ b/src/gui/fonts/textchunklist_unittest.cc @@ -466,10 +466,10 @@ TEST_CASE("TextChunkList sort 1", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item3("test line2", Color(1, 2, 3), Color(1, 2, 3)); - REQUIRE(false == item1 < item2); - REQUIRE(false == item2 < item1); - REQUIRE(true == item1 < item3); - REQUIRE(false == item3 < item1); + REQUIRE(false == (item1 < item2)); + REQUIRE(false == (item2 < item1)); + REQUIRE(item1 < item3); + REQUIRE(false == (item3 < item1)); } TEST_CASE("TextChunkList sort 2", "TextChunkList") @@ -478,8 +478,8 @@ TEST_CASE("TextChunkList sort 2", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item2("test line1", Color(2, 3, 4), Color(1, 2, 3)); - REQUIRE(true == item1 < item2); - REQUIRE(false == item2 < item1); + REQUIRE(item1 < item2); + REQUIRE(false == (item2 < item1)); } TEST_CASE("TextChunkList sort 3", "TextChunkList") @@ -488,8 +488,8 @@ TEST_CASE("TextChunkList sort 3", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item2("test line1", Color(1, 3, 4), Color(1, 2, 3)); - REQUIRE(true == item1 < item2); - REQUIRE(false == item2 < item1); + REQUIRE(item1 < item2); + REQUIRE(false == (item2 < item1)); } TEST_CASE("TextChunkList sort 4", "TextChunkList") @@ -498,8 +498,8 @@ TEST_CASE("TextChunkList sort 4", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item2("test line1", Color(1, 2, 4), Color(1, 2, 3)); - REQUIRE(true == item1 < item2); - REQUIRE(false == item2 < item1); + REQUIRE(item1 < item2); + REQUIRE(false == (item2 < item1)); } TEST_CASE("TextChunkList sort 5", "TextChunkList") @@ -508,8 +508,8 @@ TEST_CASE("TextChunkList sort 5", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item2("test line1", Color(1, 2, 3), Color(2, 2, 3)); - REQUIRE(true == item1 < item2); - REQUIRE(false == item2 < item1); + REQUIRE(item1 < item2); + REQUIRE(false == (item2 < item1)); } TEST_CASE("TextChunkList sort 6", "TextChunkList") @@ -518,8 +518,8 @@ TEST_CASE("TextChunkList sort 6", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item2("test line1", Color(1, 2, 3), Color(1, 3, 3)); - REQUIRE(true == item1 < item2); - REQUIRE(false == item2 < item1); + REQUIRE(item1 < item2); + REQUIRE(false == (item2 < item1)); } TEST_CASE("TextChunkList sort 7", "TextChunkList") @@ -528,6 +528,6 @@ TEST_CASE("TextChunkList sort 7", "TextChunkList") Color(1, 2, 3), Color(1, 2, 3)); TextChunkSmall item2("test line1", Color(1, 2, 3), Color(1, 2, 4)); - REQUIRE(true == item1 < item2); - REQUIRE(false == item2 < item1); + REQUIRE(item1 < item2); + REQUIRE(false == (item2 < item1)); } |