summary refs log tree commit diff
path: root/libnm-util/tests/test-setting-dcb.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-util/tests/test-setting-dcb.c')
-rw-r--r--libnm-util/tests/test-setting-dcb.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/libnm-util/tests/test-setting-dcb.c b/libnm-util/tests/test-setting-dcb.c
index 36192cd3..59eac3c5 100644
--- a/libnm-util/tests/test-setting-dcb.c
+++ b/libnm-util/tests/test-setting-dcb.c
@@ -21,12 +21,12 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <string.h>
 #include <nm-utils.h>
-#include <nm-glib-compat.h>
+#include "nm-default.h"
 #include "nm-setting-dcb.h"
-#include "gsystem-local-alloc.h"
+
+#include "nm-test-utils.h"
 
 #define DCB_FLAGS_ALL (NM_SETTING_DCB_FLAG_ENABLE | \
                        NM_SETTING_DCB_FLAG_ADVERTISE | \
@@ -301,24 +301,11 @@ test_dcb_bandwidth_sums (void)
 
 #define TPATH "/libnm-util/settings/dcb/"
 
+NMTST_DEFINE ();
+
 int main (int argc, char **argv)
 {
-	GError *error = NULL;
-	gboolean success;
-
-	g_test_init (&argc, &argv, NULL);
-
-#if !GLIB_CHECK_VERSION (2, 35, 0)
-	g_type_init ();
-#endif
-
-	success = nm_utils_init (&error);
-	g_assert_no_error (error);
-	g_assert (success);
-
-#if !GLIB_CHECK_VERSION(2,34,0)
-	g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
-#endif
+	nmtst_init (&argc, &argv, TRUE);
 
 	g_test_add_func (TPATH "flags-valid", test_dcb_flags_valid);
 	g_test_add_func (TPATH "flags-invalid", test_dcb_flags_invalid);