summaryrefslogtreecommitdiff
path: root/src/utils/chatutils_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-18 22:51:52 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-18 22:53:01 +0300
commit40de3bee0278d6584561a827123bc342934adccb (patch)
tree460ba68f29ec25377ef1971989c4c46e507ea3da /src/utils/chatutils_unittest.cc
parentdffd0a4a8e99196ad27f8fde2430b09dd29cac57 (diff)
downloadplus-40de3bee0278d6584561a827123bc342934adccb.tar.gz
plus-40de3bee0278d6584561a827123bc342934adccb.tar.bz2
plus-40de3bee0278d6584561a827123bc342934adccb.tar.xz
plus-40de3bee0278d6584561a827123bc342934adccb.zip
Add support for additional unit test library doctest.
Diffstat (limited to 'src/utils/chatutils_unittest.cc')
-rw-r--r--src/utils/chatutils_unittest.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc
index 875923d83..bc2013e82 100644
--- a/src/utils/chatutils_unittest.cc
+++ b/src/utils/chatutils_unittest.cc
@@ -38,6 +38,7 @@
#include "utils/chatutils.h"
#include "utils/delete2.h"
+#include "utils/env.h"
#include "render/sdlgraphics.h"
@@ -51,7 +52,7 @@
#include "debug.h"
-TEST_CASE("chatutils leak test1")
+TEST_CASE("chatutils leak test1", "")
{
logger = new Logger();
REQUIRE(gui == nullptr);
@@ -60,8 +61,10 @@ TEST_CASE("chatutils leak test1")
delete2(logger);
}
-TEST_CASE("chatutils replaceVars")
+TEST_CASE("chatutils replaceVars", "")
{
+ setEnv("SDL_VIDEODRIVER", "dummy");
+
client = new Client;
XML::initXML();
SDL_Init(SDL_INIT_VIDEO);
@@ -262,7 +265,7 @@ TEST_CASE("chatutils replaceVars")
// VirtFs::deinit();
}
-TEST_CASE("chatutils textToMe")
+TEST_CASE("chatutils textToMe", "")
{
REQUIRE(textToMe("") == "**");
REQUIRE(textToMe("123") == "*123*");
@@ -270,7 +273,7 @@ TEST_CASE("chatutils textToMe")
REQUIRE(textToMe("test line") == "*test line*");
}
-TEST_CASE("chatutils leak test2")
+TEST_CASE("chatutils leak test2", "")
{
logger = new Logger();
REQUIRE(gui == nullptr);