summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-23 01:50:57 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-23 01:50:57 +0300
commit6969655f6d251f0c638c11c8561493e938695fa0 (patch)
treea1734e6511f5cf0b5f3182e90ac544d8b03edb1e
parent2287e4b816ff5fc4f1dade45c8fca5c808ddc625 (diff)
downloadmanaverse-6969655f6d251f0c638c11c8561493e938695fa0.tar.gz
manaverse-6969655f6d251f0c638c11c8561493e938695fa0.tar.bz2
manaverse-6969655f6d251f0c638c11c8561493e938695fa0.tar.xz
manaverse-6969655f6d251f0c638c11c8561493e938695fa0.zip
fix browserbox unit test.
-rw-r--r--src/gui/widgets/browserbox_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc
index 6cfe4a425..de42597e4 100644
--- a/src/gui/widgets/browserbox_unittest.cc
+++ b/src/gui/widgets/browserbox_unittest.cc
@@ -20,6 +20,9 @@
#include "logger.h"
+#include "client.h"
+
+#include "gui/sdlfont.h"
#include "gui/theme.h"
#include "gui/widgets/browserbox.h"
@@ -34,11 +37,19 @@
#include "debug.h"
+extern const char *dirSeparator;
+
TEST(browserbox, test1)
{
PHYSFS_init("manaplus");
+ dirSeparator = "/";
+ Client::Options options;
+ Client client(options);
+
logger = new Logger();
Theme *theme = Theme::instance();
+ gcn::Widget::setGlobalFont(new SDLFont("/usr/share/fonts/truetype/"
+ "ttf-dejavu/DejaVuSans-Oblique.ttf", 18));
BrowserBox *box = new BrowserBox(nullptr, BrowserBox::AUTO_WRAP);
box->setWidth(100);
std::string row = "test";