diff options
Diffstat (limited to 'tests')
25 files changed, 67 insertions, 109 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index fdd67482a..67fe5d895 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,7 +10,8 @@ EXTRA_DIST = \ AM_CPPFLAGS = \ $(ERROR_CFLAGS) \ - -I$(top_srcdir) \ + -I$(top_srcdir)/libempathy \ + -I$(top_srcdir)/libempathy-gtk \ -DPKGDATADIR=\""$(pkgdatadir)"\" \ -DGCR_API_SUBJECT_TO_CHANGE \ $(EMPATHY_CFLAGS) \ diff --git a/tests/empathy-chatroom-manager-test.c b/tests/empathy-chatroom-manager-test.c index 7ecb82ac4..7ebf87803 100644 --- a/tests/empathy-chatroom-manager-test.c +++ b/tests/empathy-chatroom-manager-test.c @@ -1,12 +1,4 @@ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <glib/gstdio.h> - -#include <telepathy-glib/telepathy-glib.h> - -#include <libempathy/empathy-chatroom-manager.h> - +#include "empathy-chatroom-manager.h" #include "test-helper.h" #define CHATROOM_SAMPLE "chatrooms-sample.xml" diff --git a/tests/empathy-chatroom-test.c b/tests/empathy-chatroom-test.c index 3826411a5..a64fd2ce0 100644 --- a/tests/empathy-chatroom-test.c +++ b/tests/empathy-chatroom-test.c @@ -3,8 +3,7 @@ #include <string.h> #include "test-helper.h" - -#include <libempathy/empathy-chatroom.h> +#include "empathy-chatroom.h" #if 0 static EmpathyChatroom * diff --git a/tests/empathy-irc-network-manager-test.c b/tests/empathy-irc-network-manager-test.c index ba01c3782..7fb195f02 100644 --- a/tests/empathy-irc-network-manager-test.c +++ b/tests/empathy-irc-network-manager-test.c @@ -3,10 +3,9 @@ #include <string.h> #include <glib/gstdio.h> -#include "test-irc-helper.h" +#include "empathy-irc-network-manager.h" #include "test-helper.h" - -#include <libempathy/empathy-irc-network-manager.h> +#include "test-irc-helper.h" #define GLOBAL_SAMPLE "default-irc-networks-sample.xml" #define USER_SAMPLE "user-irc-networks-sample.xml" diff --git a/tests/empathy-irc-network-test.c b/tests/empathy-irc-network-test.c index 313ab0651..5ca4fba73 100644 --- a/tests/empathy-irc-network-test.c +++ b/tests/empathy-irc-network-test.c @@ -2,10 +2,9 @@ #include <stdio.h> #include <string.h> -#include "test-irc-helper.h" +#include "empathy-irc-network.h" #include "test-helper.h" - -#include <libempathy/empathy-irc-network.h> +#include "test-irc-helper.h" static void test_empathy_irc_network_new (void) diff --git a/tests/empathy-irc-server-test.c b/tests/empathy-irc-server-test.c index 573967e43..225d57bc8 100644 --- a/tests/empathy-irc-server-test.c +++ b/tests/empathy-irc-server-test.c @@ -2,10 +2,9 @@ #include <stdio.h> #include <string.h> -#include "test-irc-helper.h" +#include "empathy-irc-server.h" #include "test-helper.h" - -#include <libempathy/empathy-irc-server.h> +#include "test-irc-helper.h" static void test_empathy_irc_server_new (void) diff --git a/tests/empathy-live-search-test.c b/tests/empathy-live-search-test.c index 6c53f07ad..10f0346f3 100644 --- a/tests/empathy-live-search-test.c +++ b/tests/empathy-live-search-test.c @@ -4,12 +4,11 @@ #include <stdio.h> #include <string.h> +#include "empathy-live-search.h" #include "test-helper.h" #define DEBUG_FLAG EMPATHY_DEBUG_TESTS -#include <libempathy/empathy-debug.h> - -#include <libempathy-gtk/empathy-live-search.h> +#include "empathy-debug.h" typedef struct { diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c index 4ae6f775a..0cf037444 100644 --- a/tests/empathy-parser-test.c +++ b/tests/empathy-parser-test.c @@ -3,15 +3,13 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <telepathy-glib/telepathy-glib.h> +#include "empathy-string-parser.h" #include "test-helper.h" -#include <telepathy-glib/telepathy-glib.h> - #define DEBUG_FLAG EMPATHY_DEBUG_TESTS -#include <libempathy/empathy-debug.h> - -#include <libempathy-gtk/empathy-string-parser.h> +#include "empathy-debug.h" static void test_replace_match (const gchar *text, diff --git a/tests/empathy-tls-test.c b/tests/empathy-tls-test.c index 2004383d6..2155c68b2 100644 --- a/tests/empathy-tls-test.c +++ b/tests/empathy-tls-test.c @@ -1,18 +1,9 @@ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include <libempathy/empathy-tls-verifier.h> -#include "test-helper.h" -#include "mock-pkcs11.h" - -#include <gcr/gcr.h> - #include <gnutls/gnutls.h> - -#include <telepathy-glib/telepathy-glib.h> #include <telepathy-glib/svc-tls.h> -#include <telepathy-glib/svc-generic.h> + +#include "empathy-tls-verifier.h" +#include "mock-pkcs11.h" +#include "test-helper.h" #define MOCK_TLS_CERTIFICATE_PATH "/mock/certificate" diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am index 27fdbf7e4..4ca1989ee 100644 --- a/tests/interactive/Makefile.am +++ b/tests/interactive/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = \ $(ERROR_CFLAGS) \ - -I$(top_srcdir) \ + -I$(top_srcdir)/libempathy \ + -I$(top_srcdir)/libempathy-gtk \ -DPKGDATADIR=\""$(pkgdatadir)"\" \ $(EMPATHY_CFLAGS) \ $(WARN_CFLAGS) \ diff --git a/tests/interactive/empathy-logs.c b/tests/interactive/empathy-logs.c index 0ed9f95e4..613bf7516 100644 --- a/tests/interactive/empathy-logs.c +++ b/tests/interactive/empathy-logs.c @@ -19,15 +19,16 @@ * Authors: Xavier Claessens <xclaesse@gmail.com> */ -#include <config.h> +#include "config.h" + #include <stdlib.h> #include <glib.h> #include <gtk/gtk.h> -#include <libempathy/empathy-debug.h> -#include <libempathy/empathy-utils.h> -#include <libempathy-gtk/empathy-log-window.h> -#include <libempathy-gtk/empathy-ui-utils.h> +#include "empathy-debug.h" +#include "empathy-log-window.h" +#include "empathy-ui-utils.h" +#include "empathy-utils.h" static void destroy_cb (GtkWidget *dialog, diff --git a/tests/interactive/test-empathy-account-chooser.c b/tests/interactive/test-empathy-account-chooser.c index 7622a6248..159f8fcfa 100644 --- a/tests/interactive/test-empathy-account-chooser.c +++ b/tests/interactive/test-empathy-account-chooser.c @@ -1,9 +1,9 @@ -#include <config.h> +#include "config.h" #include <gtk/gtk.h> -#include <libempathy-gtk/empathy-ui-utils.h> -#include <libempathy-gtk/empathy-account-chooser.h> +#include "empathy-account-chooser.h" +#include "empathy-ui-utils.h" static void filter_func (TpAccount *account, diff --git a/tests/interactive/test-empathy-calendar-button.c b/tests/interactive/test-empathy-calendar-button.c index df91f1f2d..81241090f 100644 --- a/tests/interactive/test-empathy-calendar-button.c +++ b/tests/interactive/test-empathy-calendar-button.c @@ -21,7 +21,7 @@ #include "config.h" -#include <libempathy-gtk/empathy-calendar-button.h> +#include "empathy-calendar-button.h" static void date_changed_cb (EmpathyCalendarButton *button, diff --git a/tests/interactive/test-empathy-contact-blocking-dialog.c b/tests/interactive/test-empathy-contact-blocking-dialog.c index 66353f13d..185f4e954 100644 --- a/tests/interactive/test-empathy-contact-blocking-dialog.c +++ b/tests/interactive/test-empathy-contact-blocking-dialog.c @@ -19,14 +19,13 @@ * Authors: Danielle Madeley <danielle.madeley@collabora.co.uk> */ -#include <config.h> +#include "config.h" #include <gtk/gtk.h> -#include <libempathy/empathy-client-factory.h> - -#include <libempathy-gtk/empathy-ui-utils.h> -#include <libempathy-gtk/empathy-contact-blocking-dialog.h> +#include "empathy-client-factory.h" +#include "empathy-contact-blocking-dialog.h" +#include "empathy-ui-utils.h" static void am_prepare_cb (GObject *source, diff --git a/tests/interactive/test-empathy-dual-roster-view.c b/tests/interactive/test-empathy-dual-roster-view.c index 50903c01f..74bb59f17 100644 --- a/tests/interactive/test-empathy-dual-roster-view.c +++ b/tests/interactive/test-empathy-dual-roster-view.c @@ -1,10 +1,9 @@ -#include <config.h> +#include "config.h" -#include <libempathy-gtk/empathy-roster-model.h> -#include <libempathy-gtk/empathy-roster-model-manager.h> - -#include <libempathy-gtk/empathy-roster-view.h> -#include <libempathy-gtk/empathy-ui-utils.h> +#include "empathy-roster-model.h" +#include "empathy-roster-model-manager.h" +#include "empathy-roster-view.h" +#include "empathy-ui-utils.h" static void individual_activated_cb (EmpathyRosterView *self, diff --git a/tests/interactive/test-empathy-presence-chooser.c b/tests/interactive/test-empathy-presence-chooser.c index 12d35b4c6..208c9a12e 100644 --- a/tests/interactive/test-empathy-presence-chooser.c +++ b/tests/interactive/test-empathy-presence-chooser.c @@ -20,14 +20,13 @@ * Authors: Davyd Madeley <davyd.madeley@collabora.co.uk> */ -#include <config.h> +#include "config.h" #include <gtk/gtk.h> -#include <libempathy/empathy-status-presets.h> - -#include <libempathy-gtk/empathy-ui-utils.h> -#include <libempathy-gtk/empathy-presence-chooser.h> +#include "empathy-presence-chooser.h" +#include "empathy-status-presets.h" +#include "empathy-ui-utils.h" int main (int argc, char **argv) diff --git a/tests/interactive/test-empathy-protocol-chooser.c b/tests/interactive/test-empathy-protocol-chooser.c index 90b1797a3..ca548a85b 100644 --- a/tests/interactive/test-empathy-protocol-chooser.c +++ b/tests/interactive/test-empathy-protocol-chooser.c @@ -1,9 +1,9 @@ -#include <config.h> +#include "config.h" #include <gtk/gtk.h> -#include <libempathy-gtk/empathy-ui-utils.h> -#include <libempathy-gtk/empathy-protocol-chooser.h> +#include "empathy-protocol-chooser.h" +#include "empathy-ui-utils.h" int main (int argc, diff --git a/tests/interactive/test-empathy-roster-model-aggregator.c b/tests/interactive/test-empathy-roster-model-aggregator.c index 49f2012f0..478b4e6cc 100644 --- a/tests/interactive/test-empathy-roster-model-aggregator.c +++ b/tests/interactive/test-empathy-roster-model-aggregator.c @@ -1,10 +1,9 @@ -#include <config.h> +#include "config.h" -#include <libempathy-gtk/empathy-roster-model.h> -#include <libempathy-gtk/empathy-roster-model-aggregator.h> - -#include <libempathy-gtk/empathy-roster-view.h> -#include <libempathy-gtk/empathy-ui-utils.h> +#include "empathy-roster-model-aggregator.h" +#include "empathy-roster-model.h" +#include "empathy-roster-view.h" +#include "empathy-ui-utils.h" static gboolean show_offline = FALSE; static gboolean show_groups = FALSE; diff --git a/tests/interactive/test-empathy-roster-view.c b/tests/interactive/test-empathy-roster-view.c index 96137c395..f814d9658 100644 --- a/tests/interactive/test-empathy-roster-view.c +++ b/tests/interactive/test-empathy-roster-view.c @@ -1,10 +1,9 @@ -#include <config.h> +#include "config.h" -#include <libempathy-gtk/empathy-roster-model.h> -#include <libempathy-gtk/empathy-roster-model-manager.h> - -#include <libempathy-gtk/empathy-roster-view.h> -#include <libempathy-gtk/empathy-ui-utils.h> +#include "empathy-roster-model.h" +#include "empathy-roster-model-manager.h" +#include "empathy-roster-view.h" +#include "empathy-ui-utils.h" static gboolean show_offline = FALSE; static gboolean show_groups = FALSE; diff --git a/tests/interactive/test-empathy-status-preset-dialog.c b/tests/interactive/test-empathy-status-preset-dialog.c index e71852509..2494d78b7 100644 --- a/tests/interactive/test-empathy-status-preset-dialog.c +++ b/tests/interactive/test-empathy-status-preset-dialog.c @@ -22,14 +22,13 @@ * Will Thompson <will.thompson@collabora.co.uk> */ -#include <config.h> +#include "config.h" #include <gtk/gtk.h> -#include <libempathy/empathy-status-presets.h> - -#include <libempathy-gtk/empathy-ui-utils.h> -#include <libempathy-gtk/empathy-status-preset-dialog.h> +#include "empathy-status-preset-dialog.h" +#include "empathy-status-presets.h" +#include "empathy-ui-utils.h" int main (int argc, char **argv) diff --git a/tests/mock-pkcs11.c b/tests/mock-pkcs11.c index 4b1219f2c..572221acc 100644 --- a/tests/mock-pkcs11.c +++ b/tests/mock-pkcs11.c @@ -19,13 +19,8 @@ */ #include "config.h" - #include "mock-pkcs11.h" -#include <gcr/gcr.h> - -#include <glib.h> - #include <string.h> /* diff --git a/tests/mock-pkcs11.h b/tests/mock-pkcs11.h index 67d94bef3..aa024fcc9 100644 --- a/tests/mock-pkcs11.h +++ b/tests/mock-pkcs11.h @@ -18,12 +18,8 @@ * 02111-1307, USA. */ -#include <glib.h> - -#include <gcr/gcr.h> - -#include <p11-kit/pkcs11.h> #include <gck/pkcs11x.h> +#include <gcr/gcr.h> #ifndef MOCK_MODULE_H #define MOCK_MODULE_H diff --git a/tests/test-helper.c b/tests/test-helper.c index ca763adb4..efe3e3fd6 100644 --- a/tests/test-helper.c +++ b/tests/test-helper.c @@ -17,15 +17,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <stdlib.h> -#include <glib.h> -#include <glib-object.h> -#include <gtk/gtk.h> - -#include <libempathy-gtk/empathy-ui-utils.h> - +#include "config.h" #include "test-helper.h" +#include "empathy-ui-utils.h" + void test_init (int argc, char **argv) diff --git a/tests/test-irc-helper.c b/tests/test-irc-helper.c index ade247f39..6fafac804 100644 --- a/tests/test-irc-helper.c +++ b/tests/test-irc-helper.c @@ -1,3 +1,4 @@ +#include "config.h" #include "test-irc-helper.h" void diff --git a/tests/test-irc-helper.h b/tests/test-irc-helper.h index e375f6fb6..6010bc186 100644 --- a/tests/test-irc-helper.h +++ b/tests/test-irc-helper.h @@ -1,9 +1,6 @@ -#include <stdlib.h> #include <string.h> -#include <libempathy/empathy-irc-server.h> -#include <libempathy/empathy-irc-network.h> -#include <libempathy/empathy-irc-network-manager.h> +#include "empathy-irc-network-manager.h" #ifndef __CHECK_IRC_HELPER_H__ #define __CHECK_IRC_HELPER_H__ |