summaryrefslogtreecommitdiff
path: root/dbus/dbus-hash.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-11-14 14:09:59 +0000
committerSimon McVittie <smcv@collabora.com>2017-11-15 12:11:54 +0000
commited40af9284b4ea658b8b7debfa42530a1c28bbf1 (patch)
treedd2b770ecec0a6437808ecc1fd7ce4efc6d24e5c /dbus/dbus-hash.c
parent5ffb709b42783b0d13a49b8c9a84c75f556c88a2 (diff)
downloaddbus-ed40af9284b4ea658b8b7debfa42530a1c28bbf1.tar.gz
Embedded tests: Emit TAP diagnostics instead of printf
Reviewed-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103601
Diffstat (limited to 'dbus/dbus-hash.c')
-rw-r--r--dbus/dbus-hash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/dbus/dbus-hash.c b/dbus/dbus-hash.c
index ba5e7ca4..d60f6cb0 100644
--- a/dbus/dbus-hash.c
+++ b/dbus/dbus-hash.c
@@ -78,6 +78,7 @@
#include "dbus-hash.h"
#include "dbus-internals.h"
#include "dbus-mempool.h"
+#include <dbus/dbus-test-tap.h>
/**
* @defgroup DBusHashTable Hash table
@@ -1608,7 +1609,7 @@ _dbus_hash_test (void)
_dbus_assert_not_reached ("no memory");
}
- printf ("Computing test hash keys...\n");
+ _dbus_test_diag ("Computing test hash keys...");
i = 0;
while (i < N_HASH_KEYS)
{
@@ -1618,8 +1619,8 @@ _dbus_hash_test (void)
_dbus_assert (*(keys[i] + len) == '\0');
++i;
}
- printf ("... done.\n");
-
+ _dbus_test_diag ("... done.");
+
table1 = _dbus_hash_table_new (DBUS_HASH_STRING,
dbus_free, dbus_free);
if (table1 == NULL)