aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-08 17:03:20 -0400
committerTed Gould <ted@canonical.com>2009-10-08 17:03:20 -0400
commitc594126850cb7b59294069f2711fa0a5d96febbb (patch)
tree46c0a6f56f289a90f9ac0f154cabf14cdb5df219 /tests
parent605f74bd18652f40b619771e60978d6abd23c65f (diff)
downloadlibayatana-indicator-c594126850cb7b59294069f2711fa0a5d96febbb.tar.gz
libayatana-indicator-c594126850cb7b59294069f2711fa0a5d96febbb.tar.bz2
libayatana-indicator-c594126850cb7b59294069f2711fa0a5d96febbb.zip
Creating a dummy indicator that returns null
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am31
-rw-r--r--tests/dummy-indicator-null.c23
2 files changed, 53 insertions, 1 deletions
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;
+}