From caf2e3c4fb749561c37eaff324de86a9edf83808 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Jan 2016 00:41:16 +0300 Subject: Add unit tests for links replace function. --- src/resources/db/itemdb.cpp | 7 +++++++ src/resources/db/itemdb.h | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'src/resources') diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index b8e49a2db..b4af71c17 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -1055,3 +1055,10 @@ static void loadOrderSprite(ItemInfo *const itemInfo, itemInfo->setDrawBefore(direction, sprite); itemInfo->setDrawPriority(direction, priority); } + +#ifdef UNITTESTS +ItemDB::NamedItemInfos &ItemDB::getNamedItemInfosTest() +{ + return mNamedItemInfos; +} +#endif diff --git a/src/resources/db/itemdb.h b/src/resources/db/itemdb.h index 0436f604c..9231bbfc8 100644 --- a/src/resources/db/itemdb.h +++ b/src/resources/db/itemdb.h @@ -60,6 +60,10 @@ namespace ItemDB const ItemDB::ItemInfos &getItemInfos(); +#ifdef UNITTESTS + ItemDB::NamedItemInfos &getNamedItemInfosTest(); +#endif + int getTagId(const std::string &tagName) A_WARN_UNUSED; void setStatsList(const std::vector &stats); -- cgit v1.2.3-70-g09d2