From e443619d5e77a8d63c23dcf0a418135bc6c1d174 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 May 2015 21:55:22 +0300 Subject: Convert tests for browserbox into catch format. --- src/Makefile.am | 4 ++-- src/gui/widgets/browserbox_unittest.cc | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 4c1de4ac6..1627353e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1516,8 +1516,8 @@ manaplustests_CXXFLAGS = ${manaplus_CXXFLAGS} \ -DUNITTESTS manaplustests_SOURCES = ${manaplus_SOURCES} \ animatedsprite_unittest.cc \ - gui/fonts/textchunklist_unittest.cc -# gui/widgets/browserbox_unittest.cc \ + gui/fonts/textchunklist_unittest.cc \ + gui/widgets/browserbox_unittest.cc # utils/files_unittest.cc \ # utils/stringutils_unittest.cc \ # utils/xmlutils_unittest.cc \ diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc index da004445a..13ecd9ce4 100644 --- a/src/gui/widgets/browserbox_unittest.cc +++ b/src/gui/widgets/browserbox_unittest.cc @@ -20,6 +20,7 @@ #include "logger.h" +#include "catch.hpp" #include "client.h" #include "gui/fonts/font.h" @@ -28,15 +29,13 @@ #include "resources/sdlimagehelper.h" -#include "gtest/gtest.h" - #include #include "debug.h" extern const char *dirSeparator; -TEST(browserbox, test1) +TEST_CASE("BrowserBox tests", "browserbox") { PHYSFS_init("manaplus"); dirSeparator = "/"; @@ -50,7 +49,7 @@ TEST(browserbox, test1) box->setWidth(100); std::string row = "test"; box->addRow(row); - EXPECT_TRUE(box->hasRows()); + REQUIRE(box->hasRows() == true); box->clearRows(); row = "@@"; box->addRow(row); -- cgit v1.2.3-70-g09d2