aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-11-30 13:21:45 -0600
committerTed Gould <ted@gould.cx>2009-11-30 13:21:45 -0600
commitf0881be3b8f779e0411958e6637f8f29e5697cbb (patch)
treeb246e31d89f79defb4d3f2e8ba26a7c716e6f816 /tests
parent35d5c711028141dbca7907f550849b1bd1c8dfe7 (diff)
downloadayatana-indicator-application-f0881be3b8f779e0411958e6637f8f29e5697cbb.tar.gz
ayatana-indicator-application-f0881be3b8f779e0411958e6637f8f29e5697cbb.tar.bz2
ayatana-indicator-application-f0881be3b8f779e0411958e6637f8f29e5697cbb.zip
Changing the insides to remove the custom stuff.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-defines.h4
-rw-r--r--tests/test-libappindicator-dbus-client.c14
-rw-r--r--tests/test-libappindicator-dbus-server.c18
-rw-r--r--tests/test-libappindicator.c94
-rw-r--r--tests/test-simple-app.c14
5 files changed, 72 insertions, 72 deletions
diff --git a/tests/test-defines.h b/tests/test-defines.h
index 9d1fc26..11e7a24 100644
--- a/tests/test-defines.h
+++ b/tests/test-defines.h
@@ -2,9 +2,9 @@
#define TEST_ID "my-id"
#define TEST_ICON_NAME "my-icon-name"
#define TEST_ATTENTION_ICON_NAME "my-attention-icon-name"
-#define TEST_STATE CUSTOM_INDICATOR_STATUS_ACTIVE
+#define TEST_STATE APP_INDICATOR_STATUS_ACTIVE
#define TEST_STATE_S "active"
-#define TEST_CATEGORY CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS
+#define TEST_CATEGORY APP_INDICATOR_CATEGORY_APPLICATION_STATUS
#define TEST_CATEGORY_S "application-status"
#define TEST_OBJECT "/an/object/path/to/use"
diff --git a/tests/test-libappindicator-dbus-client.c b/tests/test-libappindicator-dbus-client.c
index e0203c0..f8ed4b3 100644
--- a/tests/test-libappindicator-dbus-client.c
+++ b/tests/test-libappindicator-dbus-client.c
@@ -1,7 +1,7 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
-#include <libcustomindicator/custom-indicator.h>
+#include <libappindicator/app-indicator.h>
#include "test-defines.h"
static GMainLoop * mainloop = NULL;
@@ -217,42 +217,42 @@ main (gint argc, gchar * argv[])
"Get",
prop_id_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.custom.NotificationItem",
+ G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
G_TYPE_STRING, "Id",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_category_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.custom.NotificationItem",
+ G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
G_TYPE_STRING, "Category",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_status_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.custom.NotificationItem",
+ G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
G_TYPE_STRING, "Status",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_icon_name_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.custom.NotificationItem",
+ G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
G_TYPE_STRING, "IconName",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_attention_icon_name_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.custom.NotificationItem",
+ G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
G_TYPE_STRING, "AttentionIconName",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_menu_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.custom.NotificationItem",
+ G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
G_TYPE_STRING, "Menu",
G_TYPE_INVALID);
diff --git a/tests/test-libappindicator-dbus-server.c b/tests/test-libappindicator-dbus-server.c
index 2d61776..f7b8d9f 100644
--- a/tests/test-libappindicator-dbus-server.c
+++ b/tests/test-libappindicator-dbus-server.c
@@ -2,7 +2,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
-#include <libcustomindicator/custom-indicator.h>
+#include <libappindicator/app-indicator.h>
#include "test-defines.h"
static GMainLoop * mainloop = NULL;
@@ -23,14 +23,14 @@ main (gint argc, gchar * argv[])
DbusmenuServer * dms = dbusmenu_server_new(TEST_OBJECT);
- CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE,
- "id", TEST_ID,
- "category-enum", TEST_CATEGORY,
- "status-enum", TEST_STATE,
- "icon-name", TEST_ICON_NAME,
- "attention-icon-name", TEST_ATTENTION_ICON_NAME,
- "menu-object", dms,
- NULL));
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
+ "id", TEST_ID,
+ "category-enum", TEST_CATEGORY,
+ "status-enum", TEST_STATE,
+ "icon-name", TEST_ICON_NAME,
+ "attention-icon-name", TEST_ATTENTION_ICON_NAME,
+ "menu-object", dms,
+ NULL));
g_timeout_add_seconds(2, kill_func, NULL);
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index c4342e8..1d7c920 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -2,149 +2,149 @@
#include <glib.h>
#include <glib-object.h>
-#include <libcustomindicator/custom-indicator.h>
+#include <libappindicator/app-indicator.h>
void
-test_libcustomindicator_prop_signals_status_helper (CustomIndicator * ci, gchar * status, gboolean * signalactivated)
+test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated)
{
*signalactivated = TRUE;
return;
}
void
-test_libcustomindicator_prop_signals_helper (CustomIndicator * ci, gboolean * signalactivated)
+test_libappindicator_prop_signals_helper (AppIndicator * ci, gboolean * signalactivated)
{
*signalactivated = TRUE;
return;
}
void
-test_libcustomindicator_prop_signals (void)
+test_libappindicator_prop_signals (void)
{
- CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
g_assert(ci != NULL);
gboolean signaled = FALSE;
gulong handlerid;
handlerid = 0;
- handlerid = g_signal_connect(G_OBJECT(ci), "new-icon", G_CALLBACK(test_libcustomindicator_prop_signals_helper), &signaled);
+ handlerid = g_signal_connect(G_OBJECT(ci), "new-icon", G_CALLBACK(test_libappindicator_prop_signals_helper), &signaled);
g_assert(handlerid != 0);
handlerid = 0;
- handlerid = g_signal_connect(G_OBJECT(ci), "new-attention-icon", G_CALLBACK(test_libcustomindicator_prop_signals_helper), &signaled);
+ handlerid = g_signal_connect(G_OBJECT(ci), "new-attention-icon", G_CALLBACK(test_libappindicator_prop_signals_helper), &signaled);
g_assert(handlerid != 0);
handlerid = 0;
- handlerid = g_signal_connect(G_OBJECT(ci), "new-status", G_CALLBACK(test_libcustomindicator_prop_signals_status_helper), &signaled);
+ handlerid = g_signal_connect(G_OBJECT(ci), "new-status", G_CALLBACK(test_libappindicator_prop_signals_status_helper), &signaled);
g_assert(handlerid != 0);
signaled = FALSE;
- custom_indicator_set_icon(ci, "bob");
+ app_indicator_set_icon(ci, "bob");
g_assert(signaled);
signaled = FALSE;
- custom_indicator_set_icon(ci, "bob");
+ app_indicator_set_icon(ci, "bob");
g_assert(!signaled);
signaled = FALSE;
- custom_indicator_set_icon(ci, "al");
+ app_indicator_set_icon(ci, "al");
g_assert(signaled);
signaled = FALSE;
- custom_indicator_set_attention_icon(ci, "bob");
+ app_indicator_set_attention_icon(ci, "bob");
g_assert(signaled);
signaled = FALSE;
- custom_indicator_set_attention_icon(ci, "bob");
+ app_indicator_set_attention_icon(ci, "bob");
g_assert(!signaled);
signaled = FALSE;
- custom_indicator_set_attention_icon(ci, "al");
+ app_indicator_set_attention_icon(ci, "al");
g_assert(signaled);
signaled = FALSE;
- custom_indicator_set_status(ci, CUSTOM_INDICATOR_STATUS_PASSIVE);
+ app_indicator_set_status(ci, APP_INDICATOR_STATUS_PASSIVE);
g_assert(!signaled);
signaled = FALSE;
- custom_indicator_set_status(ci, CUSTOM_INDICATOR_STATUS_ACTIVE);
+ app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE);
g_assert(signaled);
signaled = FALSE;
- custom_indicator_set_status(ci, CUSTOM_INDICATOR_STATUS_ACTIVE);
+ app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE);
g_assert(!signaled);
signaled = FALSE;
- custom_indicator_set_status(ci, CUSTOM_INDICATOR_STATUS_ATTENTION);
+ app_indicator_set_status(ci, APP_INDICATOR_STATUS_ATTENTION);
g_assert(signaled);
return;
}
void
-test_libcustomindicator_init_set_props (void)
+test_libappindicator_init_set_props (void)
{
- CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
g_assert(ci != NULL);
- custom_indicator_set_id(ci, "my-id");
- custom_indicator_set_category(ci, CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS);
- custom_indicator_set_status(ci, CUSTOM_INDICATOR_STATUS_ACTIVE);
- custom_indicator_set_icon(ci, "my-name");
- custom_indicator_set_attention_icon(ci, "my-attention-name");
+ app_indicator_set_id(ci, "my-id");
+ app_indicator_set_category(ci, APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+ app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE);
+ app_indicator_set_icon(ci, "my-name");
+ app_indicator_set_attention_icon(ci, "my-attention-name");
- g_assert(!g_strcmp0("my-id", custom_indicator_get_id(ci)));
- g_assert(!g_strcmp0("my-name", custom_indicator_get_icon(ci)));
- g_assert(!g_strcmp0("my-attention-name", custom_indicator_get_attention_icon(ci)));
- g_assert(custom_indicator_get_status(ci) == CUSTOM_INDICATOR_STATUS_ACTIVE);
- g_assert(custom_indicator_get_category(ci) == CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS);
+ g_assert(!g_strcmp0("my-id", app_indicator_get_id(ci)));
+ g_assert(!g_strcmp0("my-name", app_indicator_get_icon(ci)));
+ g_assert(!g_strcmp0("my-attention-name", app_indicator_get_attention_icon(ci)));
+ g_assert(app_indicator_get_status(ci) == APP_INDICATOR_STATUS_ACTIVE);
+ g_assert(app_indicator_get_category(ci) == APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_object_unref(G_OBJECT(ci));
return;
}
void
-test_libcustomindicator_init_with_props (void)
+test_libappindicator_init_with_props (void)
{
- CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE,
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
"id", "my-id",
- "category-enum", CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS,
- "status-enum", CUSTOM_INDICATOR_STATUS_ACTIVE,
+ "category-enum", APP_INDICATOR_CATEGORY_APPLICATION_STATUS,
+ "status-enum", APP_INDICATOR_STATUS_ACTIVE,
"icon-name", "my-name",
"attention-icon-name", "my-attention-name",
NULL));
g_assert(ci != NULL);
- g_assert(!g_strcmp0("my-id", custom_indicator_get_id(ci)));
- g_assert(!g_strcmp0("my-name", custom_indicator_get_icon(ci)));
- g_assert(!g_strcmp0("my-attention-name", custom_indicator_get_attention_icon(ci)));
- g_assert(custom_indicator_get_status(ci) == CUSTOM_INDICATOR_STATUS_ACTIVE);
- g_assert(custom_indicator_get_category(ci) == CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS);
+ g_assert(!g_strcmp0("my-id", app_indicator_get_id(ci)));
+ g_assert(!g_strcmp0("my-name", app_indicator_get_icon(ci)));
+ g_assert(!g_strcmp0("my-attention-name", app_indicator_get_attention_icon(ci)));
+ g_assert(app_indicator_get_status(ci) == APP_INDICATOR_STATUS_ACTIVE);
+ g_assert(app_indicator_get_category(ci) == APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_object_unref(G_OBJECT(ci));
return;
}
void
-test_libcustomindicator_init (void)
+test_libappindicator_init (void)
{
- CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
g_assert(ci != NULL);
g_object_unref(G_OBJECT(ci));
return;
}
void
-test_libcustomindicator_props_suite (void)
+test_libappindicator_props_suite (void)
{
- g_test_add_func ("/indicator-custom/libcustomindicator/init", test_libcustomindicator_init);
- g_test_add_func ("/indicator-custom/libcustomindicator/init_props", test_libcustomindicator_init_with_props);
- g_test_add_func ("/indicator-custom/libcustomindicator/init_set_props", test_libcustomindicator_init_set_props);
- g_test_add_func ("/indicator-custom/libcustomindicator/prop_signals", test_libcustomindicator_prop_signals);
+ g_test_add_func ("/indicator-application/libappindicator/init", test_libappindicator_init);
+ g_test_add_func ("/indicator-application/libappindicator/init_props", test_libappindicator_init_with_props);
+ g_test_add_func ("/indicator-application/libappindicator/init_set_props", test_libappindicator_init_set_props);
+ g_test_add_func ("/indicator-application/libappindicator/prop_signals", test_libappindicator_prop_signals);
return;
}
@@ -156,7 +156,7 @@ main (gint argc, gchar * argv[])
g_test_init(&argc, &argv, NULL);
/* Test suites */
- test_libcustomindicator_props_suite();
+ test_libappindicator_props_suite();
return g_test_run ();
diff --git a/tests/test-simple-app.c b/tests/test-simple-app.c
index 9e779ec..3484e9e 100644
--- a/tests/test-simple-app.c
+++ b/tests/test-simple-app.c
@@ -2,7 +2,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
-#include <libcustomindicator/custom-indicator.h>
+#include <libappindicator/app-indicator.h>
static GMainLoop * mainloop = NULL;
@@ -15,12 +15,12 @@ main (int argc, char ** argv)
DbusmenuMenuitem * dmi = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set(dmi, "label", "Bob");
- CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE,
- "id", "test-application",
- "status-enum", CUSTOM_INDICATOR_STATUS_ACTIVE,
- "icon-name", "system-shutdown",
- "menu-object", dms,
- NULL));
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
+ "id", "test-application",
+ "status-enum", APP_INDICATOR_STATUS_ACTIVE,
+ "icon-name", "system-shutdown",
+ "menu-object", dms,
+ NULL));
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);