Revert "expanded existing skillpotion-test to test for existence of description"

This reverts commit e149d444c1.
This commit is contained in:
Philipp Dreher 2015-10-31 16:56:04 +01:00
parent 486a4b8406
commit bff5f82be2
1 changed files with 1 additions and 21 deletions

View File

@ -2,16 +2,11 @@
#include "xerewards.h"
#include <kernel/faction.h>
#include <kernel/unit.h>
#include <kernel/item.h>
#include <kernel/pool.h>
#include <kernel/region.h>
#include <util/language.h>
#include <string.h>
#include <tests.h>
#include <CuTest.h>
@ -23,29 +18,14 @@ static void test_manacrystal(CuTest *tc) {
static void test_skillpotion(CuTest *tc) {
unit *u;
faction *f;
const struct item_type *itype;
const char* pPotionText = NULL;
const char* pDescription = NULL;
test_cleanup();
test_create_world();
f = test_create_faction(NULL);
u = test_create_unit(f, findregion(0, 0));
u = test_create_unit(test_create_faction(NULL), findregion(0, 0));
itype = test_create_itemtype("skillpotion");
change_resource(u, itype->rtype, 2);
CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL));
pPotionText = mkname("potion", "skillpotion");
CuAssertPtrNotNull(tc, pPotionText);
pDescription = LOC(f->locale, pPotionText);
CuAssertPtrNotNull(tc, pDescription);
CuAssert(tc, "Description empty", strlen(pDescription) == 0);
test_cleanup();
}