diff options
author | Ted Gould <ted@gould.cx> | 2012-04-25 14:22:27 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-04-25 14:22:27 -0500 |
commit | 072a5ab6d97eda7911de3c8ec843f9368af44c61 (patch) | |
tree | f10d4d40407ad49bda16bc2c2f55ed05258c744d /tests | |
parent | 7db7f0e734e5c4d7dbc46fb415b8c60c3c570f8e (diff) | |
download | ayatana-ido-072a5ab6d97eda7911de3c8ec843f9368af44c61.tar.gz ayatana-ido-072a5ab6d97eda7911de3c8ec843f9368af44c61.tar.bz2 ayatana-ido-072a5ab6d97eda7911de3c8ec843f9368af44c61.zip |
Now we can realize the menu item to make sure it doesn't mess that up
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtest-menuitems.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/gtest-menuitems.cpp b/tests/gtest-menuitems.cpp index 17356fb..1f3b866 100644 --- a/tests/gtest-menuitems.cpp +++ b/tests/gtest-menuitems.cpp @@ -8,7 +8,9 @@ class TestMenuitems : public ::testing::Test public: TestMenuitems() { - g_type_init(); + gint argc = 0; + gchar * argv[] = {NULL}; + gtk_init(&argc, (gchar ***)&argv); return; } }; @@ -20,6 +22,15 @@ TEST_F(TestMenuitems, BuildCalendar) { EXPECT_TRUE(IDO_IS_CALENDAR_MENU_ITEM(cal)); EXPECT_TRUE(GTK_IS_MENU_ITEM(cal)); + GtkWidget * menu = gtk_menu_new(); + gtk_widget_show(menu); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), cal); + + gtk_widget_show(cal); + gtk_widget_realize(cal); + + EXPECT_TRUE(gtk_widget_get_realized(cal)); + g_object_ref_sink(cal); g_object_unref(cal); return; |