aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-04-25 14:32:14 -0500
committerTed Gould <ted@gould.cx>2012-04-25 14:32:14 -0500
commitd02dfec2a8f5bb873107345b002595b7f43a010e (patch)
treedf65d8da8b560ca47af618235e38debf6485df5e /tests
parente112516ee13759235fd8056a30f886b7dcae2fda (diff)
downloadayatana-ido-d02dfec2a8f5bb873107345b002595b7f43a010e.tar.gz
ayatana-ido-d02dfec2a8f5bb873107345b002595b7f43a010e.tar.bz2
ayatana-ido-d02dfec2a8f5bb873107345b002595b7f43a010e.zip
Adding in the entry menuitem as well.
Diffstat (limited to 'tests')
-rw-r--r--tests/gtest-menuitems.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/gtest-menuitems.cpp b/tests/gtest-menuitems.cpp
index 1f3b866..4e99cc7 100644
--- a/tests/gtest-menuitems.cpp
+++ b/tests/gtest-menuitems.cpp
@@ -2,6 +2,8 @@
#include <gtk/gtk.h>
#include <gtest/gtest.h>
#include "idocalendarmenuitem.h"
+#include "idoentrymenuitem.h"
+#include "idoscalemenuitem.h"
class TestMenuitems : public ::testing::Test
{
@@ -31,7 +33,29 @@ TEST_F(TestMenuitems, BuildCalendar) {
EXPECT_TRUE(gtk_widget_get_realized(cal));
- g_object_ref_sink(cal);
- g_object_unref(cal);
+ g_object_ref_sink(menu);
+ g_object_unref(menu);
return;
}
+
+TEST_F(TestMenuitems, BuildEntry) {
+ GtkWidget * entry = ido_entry_menu_item_new();
+
+ EXPECT_TRUE(entry != NULL);
+ EXPECT_TRUE(IDO_IS_ENTRY_MENU_ITEM(entry));
+ EXPECT_TRUE(GTK_IS_MENU_ITEM(entry));
+
+ GtkWidget * menu = gtk_menu_new();
+ gtk_widget_show(menu);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), entry);
+
+ gtk_widget_show(entry);
+ gtk_widget_realize(entry);
+
+ EXPECT_TRUE(gtk_widget_get_realized(entry));
+
+ g_object_ref_sink(menu);
+ g_object_unref(menu);
+ return;
+}
+