summaryrefslogtreecommitdiff
path: root/libnm/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-19 10:19:25 +0200
committerThomas Haller <thaller@redhat.com>2017-05-19 12:45:45 +0200
commit8df944c7e495d18bfecaf9d8316ef7783039c94b (patch)
tree2d1d6dd91d55183d2a042d3b19b52aab94353378 /libnm/tests
parent72104ea10a26d4b4ff245ed60c5ccd5c043c5fe0 (diff)
downloadNetworkManager-8df944c7e495d18bfecaf9d8316ef7783039c94b.tar.gz
libnm: add testable libnm/nm-libnm-utils.c file
Previously, internal parts of libnm were not testable. Instead, add "libnm/nm-libnm-utils.c" and "libnm/libnm-utils.la" to contain code that can be statically linked with a new test "libnm/tests/test-general".
Diffstat (limited to 'libnm/tests')
-rw-r--r--libnm/tests/test-general.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/libnm/tests/test-general.c b/libnm/tests/test-general.c
new file mode 100644
index 0000000000..2653cb913d
--- /dev/null
+++ b/libnm/tests/test-general.c
@@ -0,0 +1,34 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT SC WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2017 Red Hat, Inc.
+ */
+
+#include "nm-default.h"
+
+#include "nm-utils/nm-test-utils.h"
+
+/*****************************************************************************/
+
+NMTST_DEFINE ();
+
+int main (int argc, char **argv)
+{
+ nmtst_init (&argc, &argv, TRUE);
+
+ return g_test_run ();
+}