From 7db7f0e734e5c4d7dbc46fb415b8c60c3c570f8e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 25 Apr 2012 14:12:59 -0500 Subject: Now we're allocating a calendar --- tests/Makefile.am | 8 ++++++++ tests/gtest-menuitems.cpp | 26 ++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 8fded37..03429c7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,10 @@ +if USE_GTK3 +VER=3 +IDOLIB = $(top_builddir)/src/libido3-0.1.la +else +VER= +IDOLIB = $(top_builddir)/src/libido-0.1.la +endif check_LIBRARIES = libgtest.a check_PROGRAMS = @@ -39,5 +46,6 @@ gtest_menuitems_LDFLAGS = \ -pthread gtest_menuitems_LDADD = \ $(GTK_LIBS) \ + $(IDOLIB) \ libgtest.a diff --git a/tests/gtest-menuitems.cpp b/tests/gtest-menuitems.cpp index cac28c4..17356fb 100644 --- a/tests/gtest-menuitems.cpp +++ b/tests/gtest-menuitems.cpp @@ -1,8 +1,26 @@ -#include +#include #include +#include "idocalendarmenuitem.h" -TEST(StartTesting, DummyTest) { - g_type_init(); - EXPECT_TRUE(true); +class TestMenuitems : public ::testing::Test +{ +public: + TestMenuitems() + { + g_type_init(); + return; + } +}; + +TEST_F(TestMenuitems, BuildCalendar) { + GtkWidget * cal = ido_calendar_menu_item_new(); + + EXPECT_TRUE(cal != NULL); + EXPECT_TRUE(IDO_IS_CALENDAR_MENU_ITEM(cal)); + EXPECT_TRUE(GTK_IS_MENU_ITEM(cal)); + + g_object_ref_sink(cal); + g_object_unref(cal); + return; } -- cgit v1.2.3