diff options
author | Ted Gould <ted@gould.cx> | 2009-12-01 10:47:13 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2009-12-01 10:47:13 -0600 |
commit | 6e89bf096ce0c261e2fece0cbeb6289ea21e8c5a (patch) | |
tree | b53faec9890fde9b59360bc77cf256cc45725218 /tests | |
parent | d69de93483b5ad9e709f59dac00af7ff7f4df477 (diff) | |
download | libayatana-indicator-6e89bf096ce0c261e2fece0cbeb6289ea21e8c5a.tar.gz libayatana-indicator-6e89bf096ce0c261e2fece0cbeb6289ea21e8c5a.tar.bz2 libayatana-indicator-6e89bf096ce0c261e2fece0cbeb6289ea21e8c5a.zip |
Checking to make sure we don't get connected twice, that'd be an error.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/service-manager-connect.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/service-manager-connect.c b/tests/service-manager-connect.c index 4519b83..91d2bad 100644 --- a/tests/service-manager-connect.c +++ b/tests/service-manager-connect.c @@ -17,6 +17,20 @@ timeout (gpointer data) void connection (IndicatorServiceManager * sm, gboolean connected, gpointer user_data) { + static gboolean has_connected = FALSE; + + if (has_connected && connected) { + g_warning("We got two connected signals. FAIL."); + passed = FALSE; + return; + } + + if (!connected) { + g_debug("Not connected"); + return; + } + + has_connected = TRUE; g_debug("Connection"); passed = TRUE; g_main_loop_quit(mainloop); |