From c594126850cb7b59294069f2711fa0a5d96febbb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 8 Oct 2009 17:03:20 -0400 Subject: Creating a dummy indicator that returns null --- tests/Makefile.am | 31 ++++++++++++++++++++++++++++++- tests/dummy-indicator-null.c | 23 +++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tests/dummy-indicator-null.c (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 2779ad7..ad5e5c6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,6 +2,13 @@ check_PROGRAMS = \ test-loader +check_LTLIBRARIES = \ + libdummy-indicator-null.la + +############################# +# Test Loader +############################# + test_loader_SOURCES = \ test-loader.c @@ -12,10 +19,32 @@ test_loader_CFLAGS = \ test_loader_LDADD = \ $(LIBINDICATOR_LIBS) $(top_builddir)/libindicator/.libs/libindicator.a +############################# +# Dummy Indicator +############################# + +libdummy_indicator_null_la_SOURCES = \ + dummy-indicator-null.c + +libdummy_indicator_null_la_CFLAGS = \ + -Wall -Werror \ + $(LIBINDICATOR_CFLAGS) -I$(top_srcdir) + +libdummy_indicator_null_la_LIBADD = \ + $(LIBINDICATOR_LIBS) + +libdummy_indicator_null_la_LDFLAGS = \ + -module \ + -avoid-version + +############################# +# Test stuff +############################# + XML_REPORT = loader-check-results.xml HTML_REPORT = loader-check-results.html -loader-tester: test-loader +loader-tester: test-loader libdummy-indicator-null.la @gtester -o=$(XML_REPORT) ./test-loader check-local: loader-tester diff --git a/tests/dummy-indicator-null.c b/tests/dummy-indicator-null.c new file mode 100644 index 0000000..ff99d71 --- /dev/null +++ b/tests/dummy-indicator-null.c @@ -0,0 +1,23 @@ + +#include "libindicator/indicator.h" + +INDICATOR_SET_VERSION +INDICATOR_SET_NAME("dummy-indicator-null") + +GtkLabel * +get_label (void) +{ + return NULL; +} + +GtkImage * +get_icon (void) +{ + return NULL; +} + +GtkMenu * +get_menu (void) +{ + return NULL; +} -- cgit v1.2.3