From 5e928c9ce0cbeaa1a1050a7c0e8f10fb7027514c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 20 Oct 2009 23:47:20 -0500 Subject: Now we're building a test, woot! --- .bzrignore | 5 +++++ tests/Makefile.am | 25 ++++++++++++++++++++++++- tests/test-libcustomindicator.c | 14 ++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/test-libcustomindicator.c diff --git a/.bzrignore b/.bzrignore index 8470e82..d413452 100644 --- a/.bzrignore +++ b/.bzrignore @@ -15,3 +15,8 @@ src/libcustomindicator/custom-indicator-enum-types.h src/libcustomindicator/custom-indicator-enum-types.c src/stamp-enum-types src/libcustomindicator_la-custom-indicator-enum-types.lo +tests/.deps +tests/.libs +tests/libcustomindicator-check-results.xml +tests/libcustomindicator-check-results.html +tests/test-libcustomindicator diff --git a/tests/Makefile.am b/tests/Makefile.am index 82ec364..4044617 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,26 @@ -# Something here +check_PROGRAMS = \ + test-libcustomindicator + +test_libcustomindicator_SOURCES = \ + test-libcustomindicator.c + +test_libcustomindicator_CFLAGS = \ + $(INDICATOR_CFLAGS) \ + -Wall -Werror \ + -I$(top_srcdir)/src + +test_libcustomindicator_LDADD = \ + $(INDICATOR_LIBS) \ + $(top_builddir)/src/libcustomindicator.la + +XML_REPORT = libcustomindicator-check-results.xml +HTML_REPORT = libcustomindicator-check-results.html + +libcustomindicator-tester: test-libcustomindicator + gtester -o=$(XML_REPORT) ./test-libcustomindicator + +check-local: libcustomindicator-tester + +DISTCLEANFILES = $(XML_REPORT) $(HTML_REPORT) diff --git a/tests/test-libcustomindicator.c b/tests/test-libcustomindicator.c new file mode 100644 index 0000000..fab411d --- /dev/null +++ b/tests/test-libcustomindicator.c @@ -0,0 +1,14 @@ + +#include +#include + +gint +main (gint argc, gchar * argv[]) +{ + g_type_init(); + g_test_init(&argc, &argv, NULL); + + /* Test suites */ + + return g_test_run (); +} -- cgit v1.2.3