diff options
author | Ted Gould <ted@gould.cx> | 2012-04-25 14:12:59 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-04-25 14:12:59 -0500 |
commit | 7db7f0e734e5c4d7dbc46fb415b8c60c3c570f8e (patch) | |
tree | 3fcb97a44cae40ea4d47851e641616a3acbcbf5e | |
parent | 274e47788ea7e1d7cd453598715233eb99a75292 (diff) | |
download | ayatana-ido-7db7f0e734e5c4d7dbc46fb415b8c60c3c570f8e.tar.gz ayatana-ido-7db7f0e734e5c4d7dbc46fb415b8c60c3c570f8e.tar.bz2 ayatana-ido-7db7f0e734e5c4d7dbc46fb415b8c60c3c570f8e.zip |
Now we're allocating a calendar
-rw-r--r-- | tests/Makefile.am | 8 | ||||
-rw-r--r-- | tests/gtest-menuitems.cpp | 26 |
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; } |