mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 23:28:08 +02:00
shared/tests: add nmtst_g_source_set_boolean_true() helper
This commit is contained in:
parent
71fb823a43
commit
0008c6c801
1 changed files with 20 additions and 9 deletions
|
|
@ -967,6 +967,26 @@ nmtst_rand_perm_gslist (GRand *rand, GSList *list)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
nmtst_g_source_assert_not_called (gpointer user_data)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
nmtst_g_source_set_boolean_true (gpointer user_data)
|
||||
{
|
||||
gboolean *ptr = user_data;
|
||||
|
||||
g_assert (ptr);
|
||||
g_assert (!*ptr);
|
||||
*ptr = TRUE;
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
_nmtst_main_loop_run_timeout (gpointer user_data)
|
||||
{
|
||||
|
|
@ -2391,13 +2411,4 @@ nmtst_keyfile_get_num_keys (GKeyFile *keyfile,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gboolean
|
||||
nmtst_g_source_assert_not_called (gpointer user_data)
|
||||
{
|
||||
g_assert_not_reached ();
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NM_TEST_UTILS_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue