[next] telepathy-glib: tp_private_proxy_set_implementation: don' t use g_assert_cmp* family
Simon McVittie
smcv at kemper.freedesktop.org
Tue Mar 18 05:45:05 PDT 2014
Module: telepathy-glib
Branch: next
Commit: f31b63f33ce1fc13f9051e12be1f424597d97f6f
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=f31b63f33ce1fc13f9051e12be1f424597d97f6f
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Mar 11 17:54:33 2014 +0000
tp_private_proxy_set_implementation: don't use g_assert_cmp* family
They're inappropriate outside regression tests, because they
respect test_nonfatal_assertions.
---
telepathy-glib/core-proxy.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/telepathy-glib/core-proxy.c b/telepathy-glib/core-proxy.c
index 78147f0..3b09aaf 100644
--- a/telepathy-glib/core-proxy.c
+++ b/telepathy-glib/core-proxy.c
@@ -164,9 +164,10 @@ tp_proxy_signal_connection_v0_take_results (TpProxySignalConnection *sc,
void
tp_private_proxy_set_implementation (TpProxyImplementation *impl)
{
- g_assert_cmpstr (impl->version, ==, VERSION);
- g_assert_cmpuint (impl->size, ==, sizeof (TpProxyImplementation));
- g_assert_cmpstr (g_type_name (impl->type), ==, "TpProxy");
+ /* not using tp_strdiff because it isn't available in the core library */
+ g_assert (g_str_equal (impl->version, VERSION));
+ g_assert (impl->size == sizeof (TpProxyImplementation));
+ g_assert (g_str_equal (g_type_name (impl->type), "TpProxy"));
g_assert (_tp_proxy_implementation.version == NULL);
g_assert (impl->get_interface_by_id != NULL);
@@ -180,5 +181,5 @@ tp_private_proxy_set_implementation (TpProxyImplementation *impl)
memcpy (&_tp_proxy_implementation, impl, sizeof (TpProxyImplementation));
- g_assert_cmpstr (_tp_proxy_implementation.version, ==, VERSION);
+ g_assert (g_str_equal (_tp_proxy_implementation.version, VERSION));
}
More information about the telepathy-commits
mailing list