diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-26 22:25:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-26 22:43:52 +0300 |
commit | e54fc3b08b3e8c3be1544a5716bf66e7173f4c21 (patch) | |
tree | 41e15c1e1a6d4696ea3171e5b2a9ff28ddd991d2 /src/utils/xmlutils_unittest.cc | |
parent | 836c2f5107388da9b25be0ed43d8a86d43714669 (diff) | |
download | ManaVerse-e54fc3b08b3e8c3be1544a5716bf66e7173f4c21.tar.gz ManaVerse-e54fc3b08b3e8c3be1544a5716bf66e7173f4c21.tar.bz2 ManaVerse-e54fc3b08b3e8c3be1544a5716bf66e7173f4c21.tar.xz ManaVerse-e54fc3b08b3e8c3be1544a5716bf66e7173f4c21.zip |
Convert tests for xmlutils into catch format.
Diffstat (limited to 'src/utils/xmlutils_unittest.cc')
-rw-r--r-- | src/utils/xmlutils_unittest.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc index 82d5d6603..5cf2fad96 100644 --- a/src/utils/xmlutils_unittest.cc +++ b/src/utils/xmlutils_unittest.cc @@ -20,11 +20,10 @@ #include "utils/xmlutils.h" +#include "catch.hpp" #include "client.h" #include "logger.h" -#include "gtest/gtest.h" - #include "utils/physfstools.h" #include "utils/xml.h" @@ -32,8 +31,9 @@ #include "debug.h" -static void init() +TEST_CASE("xmlutils readXmlIntVector 1") { + client = new Client; PHYSFS_init("manaplus"); dirSeparator = "/"; XML::initXML(); @@ -41,12 +41,6 @@ static void init() ResourceManager *resman = ResourceManager::getInstance(); resman->addToSearchPath("data", false); resman->addToSearchPath("../data", false); -} - -TEST(xmlutils, readXmlIntVector1) -{ - client = new Client; - init(); std::vector<int> arr; @@ -57,10 +51,10 @@ TEST(xmlutils, readXmlIntVector1) "value", arr); - EXPECT_EQ(5, arr.size()); - EXPECT_EQ(1, arr[0]); - EXPECT_EQ(15, arr[1]); - EXPECT_EQ(0, arr[2]); - EXPECT_EQ(1, arr[3]); - EXPECT_EQ(1, arr[4]); + REQUIRE(5 == arr.size()); + REQUIRE(1 == arr[0]); + REQUIRE(15 == arr[1]); + REQUIRE(0 == arr[2]); + REQUIRE(1 == arr[3]); + REQUIRE(1 == arr[4]); } |