summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-02 12:55:06 +0100
committerThomas Haller <thaller@redhat.com>2021-06-10 15:45:59 +0200
commit8358652425b971ed231d56f79c275a8bb6ccab41 (patch)
treeb7e1e4ca19494e282184e91962ee4de8c73521ac
parent500c63db3c0b102c01ad1e93b8ff74fb3e19b9d2 (diff)
downloadNetworkManager-8358652425b971ed231d56f79c275a8bb6ccab41.tar.gz
shared/tests: add nmtst_g_source_nop() helper
(cherry picked from commit ca2b79d9aa9999bdb09b31599a4bd942122b282e) (cherry picked from commit ddb69b211ce2aaeda45ca4afb664b25e9c0dfd94) (cherry picked from commit e069982492440203b9b7b4982d8904146c85c0b9)
-rw-r--r--shared/nm-utils/nm-test-utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h
index d10ba98dcb..bc4f096820 100644
--- a/shared/nm-utils/nm-test-utils.h
+++ b/shared/nm-utils/nm-test-utils.h
@@ -1057,6 +1057,13 @@ nmtst_g_source_assert_not_called (gpointer user_data)
}
static inline gboolean
+nmtst_g_source_nop (gpointer user_data)
+{
+ g_assert (!user_data);
+ return G_SOURCE_CONTINUE;
+}
+
+static inline gboolean
nmtst_g_source_set_boolean_true (gpointer user_data)
{
gboolean *ptr = user_data;