disable all direction tests instead of the minimal leak proof

This commit is contained in:
Enno Rehling 2016-09-05 17:57:59 +02:00
parent 530a6d067f
commit 7b5383dfff
2 changed files with 20 additions and 0 deletions

View File

@ -17,6 +17,7 @@ IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
ELSEIF(MSVC) ELSEIF(MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /WX /MP") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /WX /MP")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG set(CMAKE_EXE_LINKER_FLAGS_DEBUG

View File

@ -3,6 +3,7 @@
#include "direction.h" #include "direction.h"
#include "tests.h" #include "tests.h"
#include <util/umlaut.h>
#include <util/language.h> #include <util/language.h>
#include <CuTest.h> #include <CuTest.h>
@ -18,6 +19,21 @@ static void test_init_directions(CuTest *tc) {
test_cleanup(); test_cleanup();
} }
static void test_leak(CuTest *tc) {
struct locale *lang;
void **tokens;
variant token;
test_setup();
lang = get_or_create_locale("de");
tokens = get_translations(lang, UT_DIRECTIONS);
token.i = D_NORTHWEST;
addtoken(tokens, "NW", token);
addtoken(tokens, "northwest", token);
test_cleanup();
}
static void test_init_direction(CuTest *tc) { static void test_init_direction(CuTest *tc) {
struct locale *lang; struct locale *lang;
test_setup(); test_setup();
@ -52,9 +68,12 @@ static void test_finddirection(CuTest *tc) {
CuSuite *get_direction_suite(void) CuSuite *get_direction_suite(void)
{ {
CuSuite *suite = CuSuiteNew(); CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_leak);
/*
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);
*/
return suite; return suite;
} }