From b11161a7ffab99f5415e4136ce9ddd0bf6e1fa76 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Thu, 15 Mar 2012 11:30:13 -0500 Subject: Dummy commit on 'no rule' err. --- test/test-gtest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/test-gtest.cpp (limited to 'test/test-gtest.cpp') diff --git a/test/test-gtest.cpp b/test/test-gtest.cpp new file mode 100644 index 0000000..739a5c8 --- /dev/null +++ b/test/test-gtest.cpp @@ -0,0 +1,13 @@ + +#include +#include + + + + +int +main (int argc, char ** argv) +{ + printf("oheck\n"); + return 0; +} -- cgit v1.2.3 From bacad6ee225001ec39b6263ceb4aa99d55a67ba6 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Thu, 15 Mar 2012 18:22:37 -0500 Subject: Temp commit for review by charles. --- configure.ac | 8 ++++++-- test/Makefile.am | 28 ++++++++++++++++------------ test/test-gtest.cpp | 21 ++++++++++++--------- 3 files changed, 34 insertions(+), 23 deletions(-) (limited to 'test/test-gtest.cpp') diff --git a/configure.ac b/configure.ac index a85773d..8646a0f 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,7 @@ PANEL_REQUIRED_VERSION=2.0.0 INDICATE_REQUIRED_VERSION=0.6.90 INDICATOR_REQUIRED_VERSION=0.3.19 DBUSMENUGTK_REQUIRED_VERSION=0.5.90 +GLIB_REQUIRED_VERSION=2.31.20 AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk], @@ -57,14 +58,17 @@ AS_IF([test "x$with_gtk" = x3], gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION indicate-0.7 >= $INDICATE_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + glib-2.0 >= GLIB_REQUIRED_VERSION) + ], [test "x$with_gtk" = x2], [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION indicator-0.4 >= $INDICATOR_REQUIRED_VERSION indicate-0.7 >= $INDICATE_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) + dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + glib-2.0 >= GLIB_REQUIRED_VERSION) ], [AC_MSG_FAILURE([Value for --with-indicator-gtk was neither 2 nor 3])] ) diff --git a/test/Makefile.am b/test/Makefile.am index fa7bace..7b59f54 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,24 +1,28 @@ check_LIBRARIES = libgtest.a +check_PROGRAMS = test-gtest + +TESTS = AM_CPPFLAGS = $(GTEST_CPPFLAGS) nodist_libgtest_a_SOURCES = $(GTEST_SOURCE)/src/gtest-all.cc -libgtest_a_CPPFLAGS = $(GTEST_CPPFLAGS) -w -libgtest_a_CXXFLAGS = $(AM_CXXFLAGS) - libgtest_a_SOURCES = \ $(GTEST_SOURCE)/src/gtest-all.cc \ - $(GTEST_SOURCE)/src/gtest-main.cc -lib_gtest_a_CPPFLAGS = \ - $(GTEST_CPPFLAGS) \ - -I$(top_srcdir)/include \ - -I$(top_srcdir) -libxorg_gtest_a_CXXFLAGS = $(GTEST_CXXFLAGS) $(AM_CXXFLAGS) - -check_PROGRAMS = test_gtest + $(GTEST_SOURCE)/src/gtest_main.cc +libgtest_a_CPPFLAGS = \ + $(GTEST_CPPFLAGS) -w +libgtest_a_CXXFLAGS = \ + $(AM_CXXFLAGS) -test_gtest_SOURCES = test-gtest.cpp +TESTS += test-gtest +test_gtest_SOURCES = \ + test-gtest.cpp +test_gtest_CPPFLAGS = \ + $(APPLET_CFLAGS) \ + -I$(top_srcdir)/src +test_gtest_LDFLAGS = -pthread test_gtest_LDADD = \ + $(APPLET_LIBS) \ libgtest.a diff --git a/test/test-gtest.cpp b/test/test-gtest.cpp index 739a5c8..87edeab 100644 --- a/test/test-gtest.cpp +++ b/test/test-gtest.cpp @@ -1,13 +1,16 @@ -#include -#include - - +#include +#include +extern "C" { + #include "launcher-menu-item.h" +} -int -main (int argc, char ** argv) -{ - printf("oheck\n"); - return 0; +TEST(LauncherMenuItem, EmptyAtStart) { + gboolean result; + // FIXME + //LauncherMenuItem * test_li = ???; + gboolean test_eclipsed; + //result = launcher_menu_item_set_eclipsed(test_li, test_eclipsed); + EXPECT_TRUE(false); } -- cgit v1.2.3 From a5695b6ae268abc5c446a734ea8dbbcc30bc47fb Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Fri, 16 Mar 2012 16:11:07 -0500 Subject: Experimental Makefile.am changes to support GTest. --- test/Makefile.am | 6 ++++-- test/test-gtest.cpp | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'test/test-gtest.cpp') diff --git a/test/Makefile.am b/test/Makefile.am index 7b59f54..e262bae 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -18,10 +18,12 @@ libgtest_a_CXXFLAGS = \ TESTS += test-gtest test_gtest_SOURCES = \ + $(top_srcdir)/src/launcher-menu-item.c \ + $(top_srcdir)/src/default-applications.c \ + $(top_srcdir)/src/seen-db.c \ test-gtest.cpp test_gtest_CPPFLAGS = \ - $(APPLET_CFLAGS) \ - -I$(top_srcdir)/src + $(APPLET_CFLAGS) test_gtest_LDFLAGS = -pthread test_gtest_LDADD = \ $(APPLET_LIBS) \ diff --git a/test/test-gtest.cpp b/test/test-gtest.cpp index 87edeab..bb9943d 100644 --- a/test/test-gtest.cpp +++ b/test/test-gtest.cpp @@ -6,11 +6,11 @@ extern "C" { #include "launcher-menu-item.h" } -TEST(LauncherMenuItem, EmptyAtStart) { - gboolean result; - // FIXME - //LauncherMenuItem * test_li = ???; - gboolean test_eclipsed; - //result = launcher_menu_item_set_eclipsed(test_li, test_eclipsed); - EXPECT_TRUE(false); +TEST(LauncherMenuItem, NameInitialized) { + g_type_init(); + //const gchar * expected = "foo"; + //LauncherMenuItem * test_li = launcher_menu_item_new ("foo"); + //gchar * result = launcher_menu_item_get_name(test_li); + //EXPECT_EQ(0, strcmp("foo", result)); + EXPECT_TRUE(true); } -- cgit v1.2.3 From ab5696a78727fc9d20a5679481876e926baf7de7 Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Mon, 19 Mar 2012 13:38:41 -0500 Subject: Corrected a Makefile merge omission for tests, stripped down dummy test. --- Makefile.am | 5 +++++ test/test-gtest.cpp | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'test/test-gtest.cpp') diff --git a/Makefile.am b/Makefile.am index 6d4e4ee..0b5a4a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,11 @@ SUBDIRS = \ data \ po +if BUILD_TESTS +SUBDIRS += \ + test +endif + DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall --enable-deprecations dist-hook: diff --git a/test/test-gtest.cpp b/test/test-gtest.cpp index bb9943d..1cc97be 100644 --- a/test/test-gtest.cpp +++ b/test/test-gtest.cpp @@ -8,9 +8,5 @@ extern "C" { TEST(LauncherMenuItem, NameInitialized) { g_type_init(); - //const gchar * expected = "foo"; - //LauncherMenuItem * test_li = launcher_menu_item_new ("foo"); - //gchar * result = launcher_menu_item_get_name(test_li); - //EXPECT_EQ(0, strcmp("foo", result)); EXPECT_TRUE(true); } -- cgit v1.2.3