get_spellbook has a bug. new clibs version

This commit is contained in:
Enno Rehling 2017-09-18 19:13:26 +02:00
parent e2f6ada862
commit 6083ff7616
2 changed files with 14 additions and 2 deletions

2
clibs

@ -1 +1 @@
Subproject commit d286006a28c8aa7cd70ed7fd4cd172b50ade9727 Subproject commit 2a55c27fedec76845cf82c758b7b7c3fa649c286

View File

@ -51,7 +51,18 @@ void test_updatespells(CuTest * tc)
test_cleanup(); test_cleanup();
} }
void test_spellbooks(CuTest * tc) static void test_get_spellbook(CuTest * tc)
{
spellbook *sb;
test_setup();
CuAssertPtrNotNull(tc, sb = get_spellbook("hodorhodorhodor"));
CuAssertPtrEquals(tc, sb, get_spellbook("hodorhodorhodor"));
CuAssertTrue(tc, sb != get_spellbook("hodor"));
test_cleanup();
}
static void test_spellbooks(CuTest * tc)
{ {
spell *sp; spell *sp;
spellbook *herp, *derp; spellbook *herp, *derp;
@ -472,6 +483,7 @@ CuSuite *get_magic_suite(void)
SUITE_ADD_TEST(suite, test_multi_cast); SUITE_ADD_TEST(suite, test_multi_cast);
SUITE_ADD_TEST(suite, test_updatespells); SUITE_ADD_TEST(suite, test_updatespells);
SUITE_ADD_TEST(suite, test_spellbooks); SUITE_ADD_TEST(suite, test_spellbooks);
SUITE_ADD_TEST(suite, test_get_spellbook);
SUITE_ADD_TEST(suite, test_pay_spell); SUITE_ADD_TEST(suite, test_pay_spell);
SUITE_ADD_TEST(suite, test_pay_spell_failure); SUITE_ADD_TEST(suite, test_pay_spell_failure);
SUITE_ADD_TEST(suite, test_getspell_unit); SUITE_ADD_TEST(suite, test_getspell_unit);