summaryrefslogtreecommitdiff
path: root/src/utils/itemxmlutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-02 03:48:14 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-02 03:48:14 +0300
commitd7f491da52e985ea50464804d342d9d45ae407f7 (patch)
treeab3c2fe76047e0fc966f24bf0de8ac159cb64b62 /src/utils/itemxmlutils.cpp
parent359c97f1bdb7ce773c3a7cf9671ece7113685c76 (diff)
downloadmanaverse-d7f491da52e985ea50464804d342d9d45ae407f7.tar.gz
manaverse-d7f491da52e985ea50464804d342d9d45ae407f7.tar.bz2
manaverse-d7f491da52e985ea50464804d342d9d45ae407f7.tar.xz
manaverse-d7f491da52e985ea50464804d342d9d45ae407f7.zip
Add unit tests for itemxmlutils.
Diffstat (limited to 'src/utils/itemxmlutils.cpp')
-rw-r--r--src/utils/itemxmlutils.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/itemxmlutils.cpp b/src/utils/itemxmlutils.cpp
index 2f849b8ce..5dc68b249 100644
--- a/src/utils/itemxmlutils.cpp
+++ b/src/utils/itemxmlutils.cpp
@@ -20,6 +20,7 @@
#include "utils/itemxmlutils.h"
+#include "utils/checkutils.h"
#include "utils/foreach.h"
#include "utils/stringutils.h"
#include "utils/translation/podict.h"
@@ -33,7 +34,10 @@ void readItemStatsString(std::string &effect,
const ItemFieldInfos &fields)
{
if (translator == nullptr)
+ {
+ reportAlways("called readItemStatsString without translator");
return;
+ }
FOR_EACH (ItemFieldInfos::const_iterator, it, fields)
{
@@ -60,7 +64,10 @@ void readItemStatsVector(STD_VECTOR<std::string> &effect,
const ItemFieldInfos &fields)
{
if (translator == nullptr)
+ {
+ reportAlways("called readItemStatsVector without translator");
return;
+ }
FOR_EACH (ItemFieldInfos::const_iterator, it, fields)
{