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') 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