aboutsummaryrefslogtreecommitdiff
path: root/tests/test-libappindicator.c
diff options
context:
space:
mode:
authorLuke Yelavich <luke.yelavich@canonical.com>2011-02-08 17:55:35 +1100
committerLuke Yelavich <luke.yelavich@canonical.com>2011-02-08 17:55:35 +1100
commitfffab2e1e8d991a41cc591ceaca77c8a40f31f33 (patch)
tree357a2665a5cdda03ee4635d154a31c23b5adbf98 /tests/test-libappindicator.c
parent31519e77b290d832f287c1daa6a90f8d6e11b136 (diff)
downloadlibayatana-appindicator-fffab2e1e8d991a41cc591ceaca77c8a40f31f33.tar.gz
libayatana-appindicator-fffab2e1e8d991a41cc591ceaca77c8a40f31f33.tar.bz2
libayatana-appindicator-fffab2e1e8d991a41cc591ceaca77c8a40f31f33.zip
accessible_name -> accessible_desc
Diffstat (limited to 'tests/test-libappindicator.c')
-rw-r--r--tests/test-libappindicator.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 0b866f8..d62226e 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -228,40 +228,40 @@ test_libappindicator_set_label (void)
}
void
-test_libappindicator_set_accessible_name (void)
+test_libappindicator_set_accessible_desc (void)
{
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
/* First check all the clearing modes, this is important as
we're going to use them later, we need them to work. */
- app_indicator_set_accessible_name(ci, NULL);
+ app_indicator_set_accessible_desc(ci, NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- app_indicator_set_accessible_name(ci, "");
+ app_indicator_set_accessible_desc(ci, "");
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- app_indicator_set_accessible_name(ci, "accessible_name");
+ app_indicator_set_accessible_desc(ci, "accessible_desc");
- g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "accessible_name") == 0);
+ g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "accessible_desc") == 0);
- app_indicator_set_accessible_name(ci, NULL);
+ app_indicator_set_accessible_desc(ci, NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- app_indicator_set_accessible_name(ci, "accessible_name2");
+ app_indicator_set_accessible_desc(ci, "accessible_desc2");
- g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "accessible_name2") == 0);
+ g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "accessible_desc2") == 0);
- app_indicator_set_accessible_name(ci, "trick-accessible_name");
+ app_indicator_set_accessible_desc(ci, "trick-accessible_desc");
- g_assert(g_strcmp0(app_indicator_get_accessible_name(ci), "trick-accessible_name") == 0);
+ g_assert(g_strcmp0(app_indicator_get_accessible_desc(ci), "trick-accessible_desc") == 0);
g_object_unref(G_OBJECT(ci));
return;
@@ -327,10 +327,10 @@ label_signals_cb (AppIndicator * appindicator, gchar * label, gchar * guide, gpo
}
void
-accessible_name_signals_cb (AppIndicator * appindicator, gchar * accessible_name, gpointer user_data)
+accessible_desc_signals_cb (AppIndicator * appindicator, gchar * accessible_desc, gpointer user_data)
{
- gint * accessible_name_signals_count = (gint *)user_data;
- (*accessible_name_signals_count)++;
+ gint * accessible_desc_signals_count = (gint *)user_data;
+ (*accessible_desc_signals_count)++;
return;
}
@@ -345,7 +345,7 @@ label_signals_check (void)
}
void
-accessible_name_signals_check (void)
+accessible_desc_signals_check (void)
{
while (g_main_context_pending(NULL)) {
g_main_context_iteration(NULL, TRUE);
@@ -406,51 +406,51 @@ test_libappindicator_label_signals (void)
}
void
-test_libappindicator_accessible_name_signals (void)
+test_libappindicator_accessible_desc_signals (void)
{
- gint accessible_name_signals_count = 0;
+ gint accessible_desc_signals_count = 0;
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
- g_assert(app_indicator_get_accessible_name(ci) == NULL);
+ g_assert(app_indicator_get_accessible_desc(ci) == NULL);
- g_signal_connect(G_OBJECT(ci), APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_NAME, G_CALLBACK(accessible_name_signals_cb), &accessible_name_signals_count);
+ g_signal_connect(G_OBJECT(ci), APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC, G_CALLBACK(accessible_desc_signals_cb), &accessible_desc_signals_count);
/* Shouldn't be a signal as it should be stuck in idle */
- app_indicator_set_accessible_name(ci, "accessible_name");
- g_assert(accessible_name_signals_count == 0);
+ app_indicator_set_accessible_desc(ci, "accessible_desc");
+ g_assert(accessible_desc_signals_count == 0);
/* Should show up after idle processing */
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
/* Shouldn't signal with no change */
- accessible_name_signals_count = 0;
- app_indicator_set_accessible_name(ci, "accessible_name");
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 0);
+ accessible_desc_signals_count = 0;
+ app_indicator_set_accessible_desc(ci, "accessible_desc");
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 0);
/* Change one, we should get one signal */
- app_indicator_set_accessible_name(ci, "accessible_name2");
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ app_indicator_set_accessible_desc(ci, "accessible_desc2");
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
/* Change several times, one signal */
- accessible_name_signals_count = 0;
- app_indicator_set_accessible_name(ci, "accessible_name1");
- app_indicator_set_accessible_name(ci, "accessible_name1");
- app_indicator_set_accessible_name(ci, "accessible_name2");
- app_indicator_set_accessible_name(ci, "accessible_name3");
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ accessible_desc_signals_count = 0;
+ app_indicator_set_accessible_desc(ci, "accessible_desc1");
+ app_indicator_set_accessible_desc(ci, "accessible_desc1");
+ app_indicator_set_accessible_desc(ci, "accessible_desc2");
+ app_indicator_set_accessible_desc(ci, "accessible_desc3");
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
/* Clear should signal too */
- accessible_name_signals_count = 0;
- app_indicator_set_accessible_name(ci, NULL);
- accessible_name_signals_check();
- g_assert(accessible_name_signals_count == 1);
+ accessible_desc_signals_count = 0;
+ app_indicator_set_accessible_desc(ci, NULL);
+ accessible_desc_signals_check();
+ g_assert(accessible_desc_signals_count == 1);
return;
}
@@ -536,8 +536,8 @@ test_libappindicator_props_suite (void)
g_test_add_func ("/indicator-application/libappindicator/label_signals", test_libappindicator_label_signals);
g_test_add_func ("/indicator-application/libappindicator/desktop_menu", test_libappindicator_desktop_menu);
g_test_add_func ("/indicator-application/libappindicator/desktop_menu_bad",test_libappindicator_desktop_menu_bad);
- g_test_add_func ("/indicator-application/libappindicator/set_accessible_name",test_libappindicator_set_accessible_name);
- g_test_add_func ("/indicator-application/libappindicator/accessible_name_signals",test_libappindicator_accessible_name_signals);
+ g_test_add_func ("/indicator-application/libappindicator/set_accessible_desc",test_libappindicator_set_accessible_desc);
+ g_test_add_func ("/indicator-application/libappindicator/accessible_desc_signals",test_libappindicator_accessible_desc_signals);
return;
}