diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | test/Makefile.am | 28 | ||||
-rw-r--r-- | test/test-gtest.cpp | 21 |
3 files changed, 34 insertions, 23 deletions
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 <stdio.h> -#include <gtest.h> - - +#include <glib.h> +#include <gtest/gtest.h> +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); } |