leaks: remember to call test_cleanup

This commit is contained in:
Enno Rehling 2015-10-14 20:48:01 +02:00
parent 284a74c878
commit 03ff8f612d

View file

@ -99,8 +99,11 @@ static void test_parse_make_temp(CuTest *tc) {
static void test_parse_maketemp(CuTest *tc) {
char cmd[32];
order *ord;
struct locale * lang = get_or_create_locale("en");
struct locale * lang;
test_cleanup();
lang = get_or_create_locale("en");
locale_setstring(lang, keyword(K_MAKE), "MAKE");
locale_setstring(lang, keyword(K_MAKETEMP), "MAKETEMP");
locale_setstring(lang, "TEMP", "TEMP");
@ -113,17 +116,22 @@ static void test_parse_maketemp(CuTest *tc) {
CuAssertIntEquals(tc, K_MAKETEMP, init_order(ord));
CuAssertStrEquals(tc, "herp", getstrtoken());
free_order(ord);
test_cleanup();
}
static void test_init_order(CuTest *tc) {
order *ord;
struct locale * lang = get_or_create_locale("en");
struct locale * lang;
test_cleanup();
lang = get_or_create_locale("en");
ord = create_order(K_MAKETEMP, lang, "hurr durr");
CuAssertIntEquals(tc, K_MAKETEMP, init_order(ord));
CuAssertStrEquals(tc, "hurr", getstrtoken());
CuAssertStrEquals(tc, "durr", getstrtoken());
free_order(ord);
test_cleanup();
}
static void test_getstrtoken(CuTest *tc) {