aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-22 09:20:36 -0500
committerTed Gould <ted@canonical.com>2009-10-22 09:20:36 -0500
commitbca9b7ee96632e7c89092184c174b45722e0511c (patch)
treefaa775021c1cb04d8c255c60fc9f95501b9ee150 /tests
parent0df50d723494e795aa7447c02ac0f15611b2bfd8 (diff)
downloadlibayatana-appindicator-bca9b7ee96632e7c89092184c174b45722e0511c.tar.gz
libayatana-appindicator-bca9b7ee96632e7c89092184c174b45722e0511c.tar.bz2
libayatana-appindicator-bca9b7ee96632e7c89092184c174b45722e0511c.zip
Adding in two little client server binaries for testing the custom indicator.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am46
-rw-r--r--tests/test-defines.h7
-rw-r--r--tests/test-libcustomindicator-dbus-client.c11
-rw-r--r--tests/test-libcustomindicator-dbus-server.c11
4 files changed, 74 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 865573b..8327a79 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,12 @@
check_PROGRAMS = \
- test-libcustomindicator
+ test-libcustomindicator \
+ test-libcustomindicator-dbus-client \
+ test-libcustomindicator-dbus-server
+
+#########################################
+## test-libcustomindicator
+#########################################
test_libcustomindicator_SOURCES = \
test-libcustomindicator.c
@@ -14,6 +20,44 @@ test_libcustomindicator_LDADD = \
$(INDICATOR_LIBS) \
$(top_builddir)/src/libcustomindicator.la
+#########################################
+## test-libcustomindicator-dbus-client
+#########################################
+
+test_libcustomindicator_dbus_client_SOURCES = \
+ test-defines.h \
+ test-libcustomindicator-dbus-client.c
+
+test_libcustomindicator_dbus_client_CFLAGS = \
+ $(INDICATOR_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src
+
+test_libcustomindicator_dbus_client_LDADD = \
+ $(INDICATOR_LIBS) \
+ $(top_builddir)/src/libcustomindicator.la
+
+#########################################
+## test-libcustomindicator-dbus-server
+#########################################
+
+test_libcustomindicator_dbus_server_SOURCES = \
+ test-defines.h \
+ test-libcustomindicator-dbus-server.c
+
+test_libcustomindicator_dbus_server_CFLAGS = \
+ $(INDICATOR_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src
+
+test_libcustomindicator_dbus_server_LDADD = \
+ $(INDICATOR_LIBS) \
+ $(top_builddir)/src/libcustomindicator.la
+
+#########################################
+## Actual tests
+#########################################
+
XML_REPORT = libcustomindicator-check-results.xml
HTML_REPORT = libcustomindicator-check-results.html
diff --git a/tests/test-defines.h b/tests/test-defines.h
new file mode 100644
index 0000000..b68d9fc
--- /dev/null
+++ b/tests/test-defines.h
@@ -0,0 +1,7 @@
+
+#define TEST_ID "my-id"
+#define TEST_ICON_NAME "my-icon-name"
+#define TEST_ATTENTION_ICON_NAME "my-attention-icon-name"
+#define TEST_STATE CUSTOM_INDICATOR_STATE_ACTIVE
+#define TEST_CATEGORY CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS
+
diff --git a/tests/test-libcustomindicator-dbus-client.c b/tests/test-libcustomindicator-dbus-client.c
new file mode 100644
index 0000000..7c3de86
--- /dev/null
+++ b/tests/test-libcustomindicator-dbus-client.c
@@ -0,0 +1,11 @@
+
+#include <glib.h>
+#include <libcustomindicator/custom-indicator.h>
+#include "test-defines.h"
+
+gint
+main (gint argc, gchar * argv[])
+{
+
+ return 0;
+}
diff --git a/tests/test-libcustomindicator-dbus-server.c b/tests/test-libcustomindicator-dbus-server.c
new file mode 100644
index 0000000..7c3de86
--- /dev/null
+++ b/tests/test-libcustomindicator-dbus-server.c
@@ -0,0 +1,11 @@
+
+#include <glib.h>
+#include <libcustomindicator/custom-indicator.h>
+#include "test-defines.h"
+
+gint
+main (gint argc, gchar * argv[])
+{
+
+ return 0;
+}