forked from github/server
use the same DISABLE_TEST macro everywhere.
This commit is contained in:
parent
6f212686f3
commit
5faf642b9c
|
@ -57,15 +57,13 @@ static void test_get_direction_default(CuTest *tc) {
|
||||||
CuAssertIntEquals(tc, D_EAST, get_direction("east", lang));
|
CuAssertIntEquals(tc, D_EAST, get_direction("east", lang));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SUITE_DISABLE_TEST(suite, test) (void)test
|
|
||||||
|
|
||||||
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);
|
||||||
SUITE_DISABLE_TEST(suite, test_get_direction_default);
|
DISABLE_TEST(suite, test_get_direction_default);
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,6 @@ static void test_get_shortest_match(CuTest *tc) {
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SUITE_DISABLE_TEST(suite, test) (void)test
|
|
||||||
|
|
||||||
CuSuite *get_keyword_suite(void)
|
CuSuite *get_keyword_suite(void)
|
||||||
{
|
{
|
||||||
CuSuite *suite = CuSuiteNew();
|
CuSuite *suite = CuSuiteNew();
|
||||||
|
@ -103,6 +101,6 @@ 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);
|
||||||
SUITE_DISABLE_TEST(suite, test_get_keyword_default);
|
DISABLE_TEST(suite, test_get_keyword_default);
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,15 +43,13 @@ static void test_get_skill_default(CuTest *tc) {
|
||||||
CuAssertIntEquals(tc, SK_CROSSBOW, get_skill("crossbow", lang));
|
CuAssertIntEquals(tc, SK_CROSSBOW, get_skill("crossbow", lang));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SUITE_DISABLE_TEST(suite, test) (void)test
|
|
||||||
|
|
||||||
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);
|
||||||
SUITE_DISABLE_TEST(suite, test_get_skill_default);
|
DISABLE_TEST(suite, test_get_skill_default);
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue