mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02:00
libnm-glib: evaluate assert check only once in test-remote-settings-client
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
02a5b972e6
commit
faa6c34db1
1 changed files with 5 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
/*******************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue