aboutsummaryrefslogtreecommitdiff
path: root/tests/test-libcustomindicator.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-21 11:40:23 -0500
committerTed Gould <ted@canonical.com>2009-10-21 11:40:23 -0500
commitdc43af9a9e3aa1965bf3d9994f8733cdaf588912 (patch)
treeb6e2e7fa0f051e8304ab27c8f46867ff24b5f215 /tests/test-libcustomindicator.c
parentd11f7e6d29609b8d36d834cf9ff229a576c1fe89 (diff)
downloadlibayatana-appindicator-dc43af9a9e3aa1965bf3d9994f8733cdaf588912.tar.gz
libayatana-appindicator-dc43af9a9e3aa1965bf3d9994f8733cdaf588912.tar.bz2
libayatana-appindicator-dc43af9a9e3aa1965bf3d9994f8733cdaf588912.zip
Checking all the set functions.
Diffstat (limited to 'tests/test-libcustomindicator.c')
-rw-r--r--tests/test-libcustomindicator.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test-libcustomindicator.c b/tests/test-libcustomindicator.c
index 1736efa..ecc187b 100644
--- a/tests/test-libcustomindicator.c
+++ b/tests/test-libcustomindicator.c
@@ -5,6 +5,28 @@
#include <libcustomindicator/custom-indicator.h>
void
+test_libcustomindicator_init_set_props (void)
+{
+ CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_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_ON);
+ custom_indicator_set_icon(ci, "my-name");
+ custom_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_ON);
+ g_assert(custom_indicator_get_category(ci) == CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
+ g_object_unref(G_OBJECT(ci));
+ return;
+}
+
+void
test_libcustomindicator_init_with_props (void)
{
CustomIndicator * ci = CUSTOM_INDICATOR(g_object_new(CUSTOM_INDICATOR_TYPE,
@@ -40,6 +62,7 @@ test_libcustomindicator_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);
return;