mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-16 06:10:35 +01:00
test: add nmtst_assert_success() util
(cherry picked from commit f5177dbf7a)
This commit is contained in:
parent
fa0f53b07b
commit
0b10fb15a0
1 changed files with 8 additions and 0 deletions
|
|
@ -123,6 +123,14 @@ nmtst_assert_error (GError *error,
|
|||
}
|
||||
}
|
||||
|
||||
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