summaryrefslogtreecommitdiff
path: root/libnm-glib/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-07-21 11:58:03 +0200
committerThomas Haller <thaller@redhat.com>2014-07-21 12:20:56 +0200
commitfaa6c34db1a24e268982c8309f885f9c6a76c638 (patch)
tree4f645f5bd4cb4a2025231f0420f3b5fa4c3d617f /libnm-glib/tests
parent02a5b972e651c75dddc87d254c37604d91210135 (diff)
downloadNetworkManager-faa6c34db1a24e268982c8309f885f9c6a76c638.tar.gz
libnm-glib: evaluate assert check only once in test-remote-settings-client
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'libnm-glib/tests')
-rw-r--r--libnm-glib/tests/test-remote-settings-client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libnm-glib/tests/test-remote-settings-client.c b/libnm-glib/tests/test-remote-settings-client.c
index 970ba73ced..da1d632aca 100644
--- a/libnm-glib/tests/test-remote-settings-client.c
+++ b/libnm-glib/tests/test-remote-settings-client.c
@@ -49,9 +49,12 @@ cleanup (void)
#define test_assert(condition) \
do { \
- if (!G_LIKELY (condition)) \
+ gboolean _condition = ( condition ); \
+ \
+ if (G_UNLIKELY (!_condition)) { \
cleanup (); \
- g_assert (condition); \
+ g_assert (!"test_assert() failed for" # condition); \
+ } \
} while (0)
/*******************************************************************/