From 3052628251d47538650b48403b399a0930eb5dc4 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 30 Apr 2017 04:28:07 +0200 Subject: [PATCH] broaden the fumbe-lookup tests a bit, make sure prefixes don't match. --- src/kernel/spell.test.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/kernel/spell.test.c b/src/kernel/spell.test.c index 739be35da..7777024ef 100644 --- a/src/kernel/spell.test.c +++ b/src/kernel/spell.test.c @@ -86,18 +86,24 @@ static void test_spellref(CuTest *tc) test_cleanup(); } -void my_fumble(const struct castorder *co) { +void fumble_foo(const struct castorder *co) { + UNUSED_ARG(co); +} + +void fumble_bar(const struct castorder *co) { UNUSED_ARG(co); } static void test_fumbles(CuTest *tc) { test_setup(); - CuAssertTrue(tc, NULL==get_fumble("hodor")); - add_fumble("hodor", my_fumble); - CuAssertTrue(tc, my_fumble==get_fumble("hodor")); + CuAssertTrue(tc, NULL==get_fumble("foo")); + add_fumble("foone", fumble_foo); + add_fumble("foozle", fumble_bar); + CuAssertTrue(tc, fumble_foo==get_fumble("foone")); + CuAssertTrue(tc, fumble_bar==get_fumble("foozle")); + CuAssertTrue(tc, NULL==get_fumble("foo")); test_cleanup(); - CuAssertTrue(tc, NULL==get_fumble("hodor")); } CuSuite *get_spell_suite(void)