diff --git a/clibs b/clibs index d286006a2..2a55c27fe 160000 --- a/clibs +++ b/clibs @@ -1 +1 @@ -Subproject commit d286006a28c8aa7cd70ed7fd4cd172b50ade9727 +Subproject commit 2a55c27fedec76845cf82c758b7b7c3fa649c286 diff --git a/src/magic.test.c b/src/magic.test.c index b240ac467..c6866ce47 100644 --- a/src/magic.test.c +++ b/src/magic.test.c @@ -51,7 +51,18 @@ void test_updatespells(CuTest * tc) 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; spellbook *herp, *derp; @@ -472,6 +483,7 @@ CuSuite *get_magic_suite(void) SUITE_ADD_TEST(suite, test_multi_cast); SUITE_ADD_TEST(suite, test_updatespells); 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_failure); SUITE_ADD_TEST(suite, test_getspell_unit);