tests: remove cflag -w and fix warnings

The flag hides errors. But we want unit tests to be correct in order
to reveal errors in the main code.

The patch removes tests_unittests_unittests_CFLAGS which makes autotools
use AM_CFLAGS instead. Therefore, unit tests are built with flags
derived from configure.ac.
This commit is contained in:
Dmitry Podgorny
2018-10-31 18:35:59 +02:00
parent 21fffb1e86
commit e3f2ca7d10
9 changed files with 106 additions and 102 deletions

View File

@@ -64,11 +64,11 @@ returns_all_added_features(void **state)
GList *features = disco_get_features();
assert_int_equal(g_list_length(features), 5);
assert_true(g_list_find_custom(features, "first:feature", g_strcmp0));
assert_true(g_list_find_custom(features, "second:feature", g_strcmp0));
assert_true(g_list_find_custom(features, "third:feature", g_strcmp0));
assert_true(g_list_find_custom(features, "fourth:feature", g_strcmp0));
assert_true(g_list_find_custom(features, "fifth:feature", g_strcmp0));
assert_true(g_list_find_custom(features, "first:feature", (GCompareFunc)g_strcmp0));
assert_true(g_list_find_custom(features, "second:feature", (GCompareFunc)g_strcmp0));
assert_true(g_list_find_custom(features, "third:feature", (GCompareFunc)g_strcmp0));
assert_true(g_list_find_custom(features, "fourth:feature", (GCompareFunc)g_strcmp0));
assert_true(g_list_find_custom(features, "fifth:feature", (GCompareFunc)g_strcmp0));
g_list_free(features);
disco_close();