diff options
author | Ted Gould <ted@gould.cx> | 2012-04-25 14:41:21 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-04-25 14:41:21 -0500 |
commit | 62a010afdc5c7c30db3484df181ba84de7f8912d (patch) | |
tree | c61ece4221eda2eab57855e9bc546cfc7667f5b8 | |
parent | d02dfec2a8f5bb873107345b002595b7f43a010e (diff) | |
download | ayatana-ido-62a010afdc5c7c30db3484df181ba84de7f8912d.tar.gz ayatana-ido-62a010afdc5c7c30db3484df181ba84de7f8912d.tar.bz2 ayatana-ido-62a010afdc5c7c30db3484df181ba84de7f8912d.zip |
Build a scale menu item as well
-rw-r--r-- | tests/gtest-menuitems.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/gtest-menuitems.cpp b/tests/gtest-menuitems.cpp index 4e99cc7..269d360 100644 --- a/tests/gtest-menuitems.cpp +++ b/tests/gtest-menuitems.cpp @@ -59,3 +59,44 @@ TEST_F(TestMenuitems, BuildEntry) { return; } +TEST_F(TestMenuitems, BuildScaleDefault) { + GtkWidget * scale = ido_scale_menu_item_new("Label", IDO_RANGE_STYLE_DEFAULT, gtk_adjustment_new(0.5, 0.0, 1.0, 0.01, 0.1, 0.1)); + + EXPECT_TRUE(scale != NULL); + EXPECT_TRUE(IDO_IS_SCALE_MENU_ITEM(scale)); + EXPECT_TRUE(GTK_IS_MENU_ITEM(scale)); + + GtkWidget * menu = gtk_menu_new(); + gtk_widget_show(menu); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), scale); + + gtk_widget_show(scale); + gtk_widget_realize(scale); + + EXPECT_TRUE(gtk_widget_get_realized(scale)); + + g_object_ref_sink(menu); + g_object_unref(menu); + return; +} + +TEST_F(TestMenuitems, BuildScaleSmall) { + GtkWidget * scale = ido_scale_menu_item_new("Label", IDO_RANGE_STYLE_SMALL, gtk_adjustment_new(0.5, 0.0, 1.0, 0.01, 0.1, 0.1)); + + EXPECT_TRUE(scale != NULL); + EXPECT_TRUE(IDO_IS_SCALE_MENU_ITEM(scale)); + EXPECT_TRUE(GTK_IS_MENU_ITEM(scale)); + + GtkWidget * menu = gtk_menu_new(); + gtk_widget_show(menu); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), scale); + + gtk_widget_show(scale); + gtk_widget_realize(scale); + + EXPECT_TRUE(gtk_widget_get_realized(scale)); + + g_object_ref_sink(menu); + g_object_unref(menu); + return; +} |