diff options
author | Felipe Erias Morandeira <femorandeira@igalia.com> | 2013-07-19 16:02:15 +0100 |
---|---|---|
committer | Felipe Erias Morandeira <femorandeira@igalia.com> | 2013-07-22 11:43:18 +0100 |
commit | 971aeff5be714c2fce478dc970605f57a6dcb6fc (patch) | |
tree | 06d78eb444d30a034880fb9100073d61b1238e57 /test/test-action-button.c | |
parent | ee9c7244f01af156f885c291e49caa12c765ad70 (diff) |
Tests for "label-position" in EosActionButton
[endlessm/eos-sdk#108]
Diffstat (limited to 'test/test-action-button.c')
-rw-r--r-- | test/test-action-button.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/test-action-button.c b/test/test-action-button.c index ba30be5..7e4ad15 100644 --- a/test/test-action-button.c +++ b/test/test-action-button.c @@ -157,6 +157,34 @@ test_ab_prop_icon_name (ActionButtonFixture *fixture, } static void +test_ab_get_set_label_position (ActionButtonFixture *fixture, + gconstpointer unused) +{ + GtkPositionType label_pos; + + label_pos = eos_action_button_get_label_position (fixture->button); + g_assert (label_pos == GTK_POS_BOTTOM); + + eos_action_button_set_label_position (fixture->button, GTK_POS_TOP); + label_pos = eos_action_button_get_label_position (fixture->button); + g_assert (label_pos == GTK_POS_TOP); +} + +static void +test_ab_prop_label_position (ActionButtonFixture *fixture, + gconstpointer unused) +{ + GtkPositionType label_pos; + + g_object_get (fixture->button, "label-position", &label_pos, NULL); + g_assert (label_pos == GTK_POS_BOTTOM); + + g_object_set (fixture->button, "label-position", GTK_POS_TOP, NULL); + g_object_get (fixture->button, "label-position", &label_pos, NULL); + g_assert (label_pos == GTK_POS_TOP); +} + +static void test_ab_label_agrees (ActionButtonFixture *fixture, gconstpointer unused) { @@ -189,5 +217,9 @@ add_action_button_tests (void) test_ab_get_set_icon_name); ADD_ACTION_BUTTON_TEST ("/action-button/prop-icon-name", test_ab_prop_icon_name); + ADD_ACTION_BUTTON_TEST ("/action-button/get-set-label-position", + test_ab_get_set_label_position); + ADD_ACTION_BUTTON_TEST ("/action-button/prop-label-position", + test_ab_prop_label_position); ADD_ACTION_BUTTON_TEST ("/action-button/label-agrees", test_ab_label_agrees); } |