aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/gtest-menuitems.cpp26
2 files changed, 30 insertions, 4 deletions
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 <glib-object.h>
+#include <gtk/gtk.h>
#include <gtest/gtest.h>
+#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;
}