diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 34 | ||||
-rw-r--r-- | test/test-gtest.cpp | 16 |
2 files changed, 50 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..e359ad4 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,34 @@ + +check_LIBRARIES = libgtest.a +check_PROGRAMS = test-gtest + +TESTS = + +AM_CPPFLAGS = $(GTEST_CPPFLAGS) \ + -I${top_srcdir}/src + +nodist_libgtest_a_SOURCES = $(GTEST_SOURCE)/src/gtest-all.cc +libgtest_a_SOURCES = \ + $(GTEST_SOURCE)/src/gtest-all.cc \ + $(GTEST_SOURCE)/src/gtest_main.cc +libgtest_a_CPPFLAGS = \ + $(GTEST_CPPFLAGS) -w +libgtest_a_CXXFLAGS = \ + $(AM_CXXFLAGS) +libgtest_a_CPPFLAGS = \ + $(AM_CPPFLAGS) + +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) \ + $(AM_CPPFLAGS) +test_gtest_LDFLAGS = -pthread +test_gtest_LDADD = \ + $(APPLET_LIBS) \ + libgtest.a diff --git a/test/test-gtest.cpp b/test/test-gtest.cpp new file mode 100644 index 0000000..bb9943d --- /dev/null +++ b/test/test-gtest.cpp @@ -0,0 +1,16 @@ + +#include <glib.h> +#include <gtest/gtest.h> + +extern "C" { + #include "launcher-menu-item.h" +} + +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); +} |