mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 09:30:31 +01:00
test: add nmtst_assert_success() util
This commit is contained in:
parent
d6a331bd8c
commit
f5177dbf7a
1 changed files with 8 additions and 0 deletions
|
|
@ -137,6 +137,14 @@ nmtst_assert_error (GError *error,
|
|||
} \
|
||||
} G_STMT_END
|
||||
|
||||
inline static void
|
||||
_nmtst_assert_success (gboolean success, GError *error, const char *file, int line)
|
||||
{
|
||||
if (!success || error)
|
||||
g_error ("(%s:%d) FAILURE success=%d, error=%s", file, line, success, error && error->message ? error->message : "(no error)");
|
||||
}
|
||||
#define nmtst_assert_success(success, error) _nmtst_assert_success ((success), (error), __FILE__, __LINE__)
|
||||
|
||||
/*******************************************************************************/
|
||||
|
||||
struct __nmtst_internal
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue