diff options
| author | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-05-11 22:08:45 +0200 |
| commit | ee9c73a923909e23a649407be77e25235d769e25 (patch) | |
| tree | e21c923621fa278e737da693df9eb60ea31a6067 /clients/common/tests | |
| parent | f60117b41d5433be1b4a96d82cd11d0c3dce9b63 (diff) | |
New upstream version 1.10.8 upstream/1.10.8
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, 7 insertions, 26 deletions
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build deleted file mode 100644 index cc357cdc..00000000 --- a/clients/common/tests/meson.build +++ /dev/null @@ -1,23 +0,0 @@ -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 8f96eb26..64efd14d 100644 --- a/clients/common/tests/test-general.c +++ b/clients/common/tests/test-general.c @@ -19,6 +19,10 @@ #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" @@ -86,7 +90,7 @@ test_client_meta_check (void) g_assert (pi->setting_info == info); g_assert (pi->property_name); - g_assert (g_hash_table_add (property_names, (gpointer) pi->property_name)); + g_assert (nm_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)); @@ -100,14 +104,14 @@ test_client_meta_check (void) if (info->valid_parts) { gsize i, l; - gs_unref_hashtable GHashTable *dup = g_hash_table_new (nm_direct_hash, NULL); + gs_unref_hashtable GHashTable *dup = g_hash_table_new (NULL, 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 (g_hash_table_add (dup, (gpointer) info->valid_parts[i]->setting_info)); + g_assert (nm_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]); |