diff options
Diffstat (limited to 'clients/common/tests')
| -rw-r--r-- | clients/common/tests/meson.build | 23 | ||||
| -rw-r--r-- | clients/common/tests/test-general.c | 10 |
2 files changed, 26 insertions, 7 deletions
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build new file mode 100644 index 00000000..cc357cdc --- /dev/null +++ b/clients/common/tests/meson.build @@ -0,0 +1,23 @@ +test_unit = 'test-general' + +deps = [ + libnm_dep, + libnmc_dep, + libnmc_base_dep, + nm_core_dep +] + +exe = executable( + 'clients-' + test_unit, + test_unit + '.c', + dependencies: deps, + c_args: clients_cflags + [ + '-DNETWORKMANAGER_COMPILATION_TEST', + ], +) + +test( + 'clients/' + test_unit, + test_script, + args: test_args + [exe.full_path()] +) diff --git a/clients/common/tests/test-general.c b/clients/common/tests/test-general.c index 64efd14d..8f96eb26 100644 --- a/clients/common/tests/test-general.c +++ b/clients/common/tests/test-general.c @@ -19,10 +19,6 @@ #include "nm-default.h" -#include "NetworkManager.h" - -#include "nm-utils/nm-hash-utils.h" - #include "nm-meta-setting-access.h" #include "nm-utils/nm-test-utils.h" @@ -90,7 +86,7 @@ test_client_meta_check (void) g_assert (pi->setting_info == info); g_assert (pi->property_name); - g_assert (nm_g_hash_table_add (property_names, (gpointer) pi->property_name)); + g_assert (g_hash_table_add (property_names, (gpointer) pi->property_name)); g_assert_cmpstr (pi->property_name, ==, pi->meta_type->get_name ((const NMMetaAbstractInfo *) pi, FALSE)); g_assert_cmpstr (pi->property_name, ==, pi->meta_type->get_name ((const NMMetaAbstractInfo *) pi, TRUE)); @@ -104,14 +100,14 @@ test_client_meta_check (void) if (info->valid_parts) { gsize i, l; - gs_unref_hashtable GHashTable *dup = g_hash_table_new (NULL, NULL); + gs_unref_hashtable GHashTable *dup = g_hash_table_new (nm_direct_hash, NULL); l = NM_PTRARRAY_LEN (info->valid_parts); g_assert (l >= 2); for (i = 0; info->valid_parts[i]; i++) { g_assert (info->valid_parts[i]->setting_info); - g_assert (nm_g_hash_table_add (dup, (gpointer) info->valid_parts[i]->setting_info)); + g_assert (g_hash_table_add (dup, (gpointer) info->valid_parts[i]->setting_info)); if (i == 0) { g_assert (info->valid_parts[i]->setting_info == &nm_meta_setting_infos_editor[NM_META_SETTING_TYPE_CONNECTION]); |