remove invalid tests. uninitialized locales do not have default words

This commit is contained in:
Enno Rehling 2015-11-01 05:35:10 +01:00
parent 87ba4ef6dc
commit 0b098dede6
3 changed files with 0 additions and 35 deletions

View File

@ -44,26 +44,12 @@ static void test_finddirection(CuTest *tc) {
CuAssertIntEquals(tc, NODIRECTION, finddirection("potato")); CuAssertIntEquals(tc, NODIRECTION, finddirection("potato"));
} }
static void test_get_direction_default(CuTest *tc) {
struct locale *lang;
test_cleanup();
lang = get_or_create_locale("en");
CuAssertIntEquals(tc, NODIRECTION, get_direction("potato", lang));
CuAssertIntEquals(tc, D_SOUTHWEST, get_direction("southwest", lang));
CuAssertIntEquals(tc, D_SOUTHEAST, get_direction("southeast", lang));
CuAssertIntEquals(tc, D_NORTHWEST, get_direction("northwest", lang));
CuAssertIntEquals(tc, D_NORTHEAST, get_direction("northeast", lang));
CuAssertIntEquals(tc, D_WEST, get_direction("west", lang));
CuAssertIntEquals(tc, D_EAST, get_direction("east", lang));
}
CuSuite *get_direction_suite(void) CuSuite *get_direction_suite(void)
{ {
CuSuite *suite = CuSuiteNew(); CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_init_direction); SUITE_ADD_TEST(suite, test_init_direction);
SUITE_ADD_TEST(suite, test_init_directions); SUITE_ADD_TEST(suite, test_init_directions);
SUITE_ADD_TEST(suite, test_finddirection); SUITE_ADD_TEST(suite, test_finddirection);
DISABLE_TEST(suite, test_get_direction_default);
return suite; return suite;
} }

View File

@ -65,16 +65,6 @@ static void test_findkeyword(CuTest *tc) {
test_cleanup(); test_cleanup();
} }
static void test_get_keyword_default(CuTest *tc) {
struct locale *lang;
test_cleanup();
lang = get_or_create_locale("en");
CuAssertIntEquals(tc, NOKEYWORD, get_keyword("potato", lang));
CuAssertIntEquals(tc, K_MOVE, get_keyword("move", lang));
CuAssertIntEquals(tc, K_STUDY, get_keyword("study", lang));
test_cleanup();
}
static void test_get_shortest_match(CuTest *tc) { static void test_get_shortest_match(CuTest *tc) {
struct locale *lang; struct locale *lang;
critbit_tree ** cb; critbit_tree ** cb;
@ -102,6 +92,5 @@ CuSuite *get_keyword_suite(void)
SUITE_ADD_TEST(suite, test_init_keywords); SUITE_ADD_TEST(suite, test_init_keywords);
SUITE_ADD_TEST(suite, test_findkeyword); SUITE_ADD_TEST(suite, test_findkeyword);
SUITE_ADD_TEST(suite, test_get_shortest_match); SUITE_ADD_TEST(suite, test_get_shortest_match);
DISABLE_TEST(suite, test_get_keyword_default);
return suite; return suite;
} }

View File

@ -35,22 +35,12 @@ static void test_get_skill(CuTest *tc) {
CuAssertIntEquals(tc, NOSKILL, findskill("potato")); CuAssertIntEquals(tc, NOSKILL, findskill("potato"));
} }
static void test_get_skill_default(CuTest *tc) {
struct locale *lang;
test_cleanup();
lang = get_or_create_locale("en");
CuAssertIntEquals(tc, NOSKILL, get_skill("potato", lang));
CuAssertIntEquals(tc, SK_ALCHEMY, get_skill("alchemy", lang));
CuAssertIntEquals(tc, SK_CROSSBOW, get_skill("crossbow", lang));
}
CuSuite *get_skill_suite(void) CuSuite *get_skill_suite(void)
{ {
CuSuite *suite = CuSuiteNew(); CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_init_skill); SUITE_ADD_TEST(suite, test_init_skill);
SUITE_ADD_TEST(suite, test_init_skills); SUITE_ADD_TEST(suite, test_init_skills);
SUITE_ADD_TEST(suite, test_get_skill); SUITE_ADD_TEST(suite, test_get_skill);
DISABLE_TEST(suite, test_get_skill_default);
return suite; return suite;
} }