diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-01-25 12:22:12 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-01-25 12:22:12 +0100 |
commit | c26baddf8b8f8a290557f1a51d4e957bc95e45c1 (patch) | |
tree | e6f4f7070b2de3a37d7bf7757d48f7b7c1ef8e8c | |
parent | c9df18becfc38ab3e3a833d0095c26f5140800e1 (diff) | |
download | libayatana-indicator-c26baddf8b8f8a290557f1a51d4e957bc95e45c1.tar.gz libayatana-indicator-c26baddf8b8f8a290557f1a51d4e957bc95e45c1.tar.bz2 libayatana-indicator-c26baddf8b8f8a290557f1a51d4e957bc95e45c1.zip |
Added better parent_object tests.
-rw-r--r-- | tests/test-loader.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test-loader.c b/tests/test-loader.c index 6f9d25b..b567733 100644 --- a/tests/test-loader.c +++ b/tests/test-loader.c @@ -190,6 +190,8 @@ test_loader_filename_dummy_visible (void) g_assert(entry != NULL); g_list_free(list); g_assert(GTK_IS_LABEL(entry->label)); + g_assert(entry->parent_object == object); + g_assert(INDICATOR_IS_OBJECT(entry->parent_object)); GtkWidget * label = GTK_WIDGET(entry->label); g_assert(g_object_get_qdata(G_OBJECT(label), is_hidden_quark) == NULL); @@ -239,9 +241,11 @@ test_loader_filename_dummy_simple_location (void) g_assert(entries != NULL); g_assert(g_list_length(entries) == 1); - g_assert(indicator_object_get_location(object, (IndicatorObjectEntry *)entries->data) == 0); + IndicatorObjectEntry *entry = entries->data; + + g_assert(indicator_object_get_location(object, entry) == 0); g_assert(indicator_object_get_location(object, NULL) == 0); - g_assert(((IndicatorObjectEntry *)entries->data)->parent_object != NULL); + g_assert(entry->parent_object == object); g_object_unref(object); |