aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2009-12-04 10:54:45 -0600
committerCody Russell <crussell@canonical.com>2009-12-04 10:54:45 -0600
commit670019c9df91b44f507589e4a2729e08d72624d1 (patch)
treed746c279d5b29f92d3002a815ebebb796f2c4979 /tests
parent7406617f441d1377aee6beebe3498c1e37fec57d (diff)
downloadlibayatana-appindicator-670019c9df91b44f507589e4a2729e08d72624d1.tar.gz
libayatana-appindicator-670019c9df91b44f507589e4a2729e08d72624d1.tar.bz2
libayatana-appindicator-670019c9df91b44f507589e4a2729e08d72624d1.zip
Test fixes
Diffstat (limited to 'tests')
-rw-r--r--tests/test-libappindicator-dbus-server.c6
-rw-r--r--tests/test-libappindicator.c17
2 files changed, 12 insertions, 11 deletions
diff --git a/tests/test-libappindicator-dbus-server.c b/tests/test-libappindicator-dbus-server.c
index b316456..d900899 100644
--- a/tests/test-libappindicator-dbus-server.c
+++ b/tests/test-libappindicator-dbus-server.c
@@ -46,10 +46,10 @@ main (gint argc, gchar * argv[])
DbusmenuServer * dms = dbusmenu_server_new(TEST_OBJECT);
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
+ AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
"id", TEST_ID,
- "category-enum", TEST_CATEGORY,
- "status-enum", TEST_STATE,
+ "category", TEST_CATEGORY,
+ "status", TEST_STATE,
"icon-name", TEST_ICON_NAME,
"attention-icon-name", TEST_ATTENTION_ICON_NAME,
"menu-object", dms,
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index c0ec1ff..896782d 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -115,6 +115,7 @@ test_libappindicator_init_set_props (void)
AppIndicator * ci = app_indicator_new ("my-id",
"my-name",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
g_assert(ci != NULL);
app_indicator_set_status(ci, APP_INDICATOR_STATUS_ACTIVE);
@@ -133,13 +134,13 @@ test_libappindicator_init_set_props (void)
void
test_libappindicator_init_with_props (void)
{
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE,
- "id", "my-id",
- "category-enum", APP_INDICATOR_CATEGORY_APPLICATION_STATUS,
- "status-enum", APP_INDICATOR_STATUS_ACTIVE,
- "icon-name", "my-name",
- "attention-icon-name", "my-attention-name",
- NULL));
+ AppIndicator * ci = app_indicator_new ("my-id",
+ "my-name",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
+ app_indicator_set_status (ci, APP_INDICATOR_STATUS_ACTIVE);
+ app_indicator_set_attention_icon (ci, "my-attention-name");
+
g_assert(ci != NULL);
g_assert(!g_strcmp0("my-id", app_indicator_get_id(ci)));
@@ -155,7 +156,7 @@ test_libappindicator_init_with_props (void)
void
test_libappindicator_init (void)
{
- AppIndicator * ci = APP_INDICATOR(g_object_new(APP_INDICATOR_TYPE, NULL));
+ AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
g_assert(ci != NULL);
g_object_unref(G_OBJECT(ci));
return;