diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-12-18 15:44:59 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-12-18 15:44:59 +0100 |
commit | 9ac72980d192b716cfb549e0501b70a152811e62 (patch) | |
tree | 49220b08e6dc2c717ee17a90d77249cc36fb646d | |
parent | 53b92561cb1a815ca2f3622ad7ec4e27cf2c069d (diff) | |
download | profani-tty-9ac72980d192b716cfb549e0501b70a152811e62.tar.gz |
xep-0084: add test stub file
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | src/xmpp/avatar.c | 2 | ||||
-rw-r--r-- | src/xmpp/avatar.h | 2 | ||||
-rw-r--r-- | tests/unittests/xmpp/stub_avatar.c | 7 |
4 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 6fe31446..95b2401d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -105,6 +105,7 @@ unittest_sources = \ src/event/server_events.c src/event/server_events.h \ src/event/client_events.c src/event/client_events.h \ src/ui/tray.h src/ui/tray.c \ + tests/unittests/xmpp/stub_avatar.c \ tests/unittests/xmpp/stub_xmpp.c \ tests/unittests/xmpp/stub_message.c \ tests/unittests/ui/stub_ui.c tests/unittests/ui/stub_ui.h \ diff --git a/src/xmpp/avatar.c b/src/xmpp/avatar.c index 4d250462..fb69424c 100644 --- a/src/xmpp/avatar.c +++ b/src/xmpp/avatar.c @@ -76,7 +76,7 @@ avatar_pep_subscribe(void) //caps_add_feature(XMPP_FEATURE_USER_AVATAR_METADATA_NOTIFY); } -bool +gboolean avatar_get_by_nick(const char* nick) { caps_remove_feature(XMPP_FEATURE_USER_AVATAR_METADATA_NOTIFY); diff --git a/src/xmpp/avatar.h b/src/xmpp/avatar.h index 8f1415b6..37026542 100644 --- a/src/xmpp/avatar.h +++ b/src/xmpp/avatar.h @@ -39,6 +39,6 @@ #include <glib.h> void avatar_pep_subscribe(void); -bool avatar_get_by_nick(const char* nick); +gboolean avatar_get_by_nick(const char* nick); #endif diff --git a/tests/unittests/xmpp/stub_avatar.c b/tests/unittests/xmpp/stub_avatar.c new file mode 100644 index 00000000..64b8a95f --- /dev/null +++ b/tests/unittests/xmpp/stub_avatar.c @@ -0,0 +1,7 @@ +#include <stdio.h> +#include <glib.h> +#include <stdlib.h> + +void avatar_pep_subscribe(void) {}; +gboolean avatar_get_by_nick(const char* nick) {return TRUE;} + |