summaryrefslogtreecommitdiff
path: root/test/internals
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-10-03 19:15:38 +0100
committerSimon McVittie <smcv@collabora.com>2019-01-21 15:18:18 +0000
commitb28e0886ed58570b769d1ea7a8c6518e0fc0237f (patch)
tree6a36828a03b1e3ce69ad1deae44d8fdb99a9195a /test/internals
parent3b512610c0414c4f40c464e1a8dd5d3d665e74d7 (diff)
downloaddbus-b28e0886ed58570b769d1ea7a8c6518e0fc0237f.tar.gz
test: Move libdbus embedded tests from dbus/ to test/
This groups them with the rest of the tests, and enables parts of the test code to be unembedded from libdbus and moved to test/ too. Rename the executable to test-misc-internals, not test-dbus. The name test-dbus made some sense as "the executable that contains the code in dbus/", but makes a lot less sense in test/: dbus is the name of the entire project, so this test has no particular special claim to that name. test-libdbus doesn't seem right either, because all the tests exercise libdbus one way or another. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/internals')
-rw-r--r--test/internals/misc-internals.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/test/internals/misc-internals.c b/test/internals/misc-internals.c
new file mode 100644
index 00000000..999cbaa7
--- /dev/null
+++ b/test/internals/misc-internals.c
@@ -0,0 +1,69 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright 2002-2009 Red Hat, Inc.
+ * Copyright 2011-2018 Collabora Ltd.
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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
+ *
+ */
+
+#include <config.h>
+
+#include "dbus/dbus-internals.h"
+#include "dbus/dbus-test.h"
+#include "dbus/dbus-test-wrappers.h"
+
+static DBusTestCase tests[] =
+{
+ { "string", _dbus_string_test },
+ { "sysdeps", _dbus_sysdeps_test },
+ { "data-slot", _dbus_data_slot_test },
+ { "misc", _dbus_misc_test },
+ { "address", _dbus_address_test },
+ { "server", _dbus_server_test },
+ { "object-tree", _dbus_object_tree_test },
+ { "signature", _dbus_signature_test },
+ { "marshalling", _dbus_marshal_test },
+ { "marshal-recursive" , _dbus_marshal_recursive_test },
+ { "byteswap", _dbus_marshal_byteswap_test },
+ { "memory", _dbus_memory_test },
+ { "mem-pool", _dbus_mem_pool_test },
+ { "list", _dbus_list_test },
+ { "marshal-validate", _dbus_marshal_validate_test },
+ { "message", _dbus_message_test },
+ { "hash", _dbus_hash_test },
+ { "credentials", _dbus_credentials_test },
+ { "keyring", _dbus_keyring_test },
+ { "sha", _dbus_sha_test },
+ { "auth", _dbus_auth_test },
+
+#if defined(DBUS_UNIX)
+ { "userdb", _dbus_userdb_test },
+ { "transport-unix", _dbus_transport_unix_test },
+#endif
+
+ { NULL }
+};
+
+int
+main (int argc,
+ char **argv)
+{
+ return _dbus_test_main (argc, argv, _DBUS_N_ELEMENTS (tests), tests,
+ DBUS_TEST_FLAGS_CHECK_MEMORY_LEAKS,
+ NULL, NULL);
+}