diff options
-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; |