aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-01 10:47:13 -0600
committerTed Gould <ted@gould.cx>2009-12-01 10:47:13 -0600
commit6e89bf096ce0c261e2fece0cbeb6289ea21e8c5a (patch)
treeb53faec9890fde9b59360bc77cf256cc45725218
parentd69de93483b5ad9e709f59dac00af7ff7f4df477 (diff)
downloadlibayatana-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.
-rw-r--r--tests/service-manager-connect.c14
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);