cleanup: Map test files according to structure in src
For example cmd_account() is located in src/command/cmd_funcs.c. The unit test was located in tests/unittests/test_cmd_account.c. Let's move it to a subdirectory like tests/unittests/command/test_cmd_account.c to correpsond to the same structure.
This commit is contained in:
50
Makefile.am
50
Makefile.am
@@ -142,31 +142,31 @@ unittest_sources = \
|
||||
tests/unittests/tools/stub_aesgcm_download.c \
|
||||
tests/unittests/tools/stub_plugin_download.c \
|
||||
tests/unittests/helpers.c tests/unittests/helpers.h \
|
||||
tests/unittests/test_form.c tests/unittests/test_form.h \
|
||||
tests/unittests/xmpp/test_form.c tests/unittests/xmpp/test_form.h \
|
||||
tests/unittests/test_common.c tests/unittests/test_common.h \
|
||||
tests/unittests/test_autocomplete.c tests/unittests/test_autocomplete.h \
|
||||
tests/unittests/test_jid.c tests/unittests/test_jid.h \
|
||||
tests/unittests/test_parser.c tests/unittests/test_parser.h \
|
||||
tests/unittests/test_roster_list.c tests/unittests/test_roster_list.h \
|
||||
tests/unittests/test_chat_session.c tests/unittests/test_chat_session.h \
|
||||
tests/unittests/test_contact.c tests/unittests/test_contact.h \
|
||||
tests/unittests/test_preferences.c tests/unittests/test_preferences.h \
|
||||
tests/unittests/test_server_events.c tests/unittests/test_server_events.h \
|
||||
tests/unittests/test_muc.c tests/unittests/test_muc.h \
|
||||
tests/unittests/test_cmd_presence.c tests/unittests/test_cmd_presence.h \
|
||||
tests/unittests/test_cmd_alias.c tests/unittests/test_cmd_alias.h \
|
||||
tests/unittests/test_cmd_connect.c tests/unittests/test_cmd_connect.h \
|
||||
tests/unittests/test_cmd_rooms.c tests/unittests/test_cmd_rooms.h \
|
||||
tests/unittests/test_cmd_account.c tests/unittests/test_cmd_account.h \
|
||||
tests/unittests/test_cmd_sub.c tests/unittests/test_cmd_sub.h \
|
||||
tests/unittests/test_cmd_bookmark.c tests/unittests/test_cmd_bookmark.h \
|
||||
tests/unittests/test_cmd_otr.c tests/unittests/test_cmd_otr.h \
|
||||
tests/unittests/test_cmd_pgp.c tests/unittests/test_cmd_pgp.h \
|
||||
tests/unittests/test_cmd_join.c tests/unittests/test_cmd_join.h \
|
||||
tests/unittests/test_cmd_roster.c tests/unittests/test_cmd_roster.h \
|
||||
tests/unittests/test_cmd_disconnect.c tests/unittests/test_cmd_disconnect.h \
|
||||
tests/unittests/test_callbacks.c tests/unittests/test_callbacks.h \
|
||||
tests/unittests/test_plugins_disco.c tests/unittests/test_plugins_disco.h \
|
||||
tests/unittests/tools/test_autocomplete.c tests/unittests/tools/test_autocomplete.h \
|
||||
tests/unittests/xmpp/test_jid.c tests/unittests/xmpp/test_jid.h \
|
||||
tests/unittests/tools/test_parser.c tests/unittests/tools/test_parser.h \
|
||||
tests/unittests/xmpp/test_roster_list.c tests/unittests/xmpp/test_roster_list.h \
|
||||
tests/unittests/xmpp/test_chat_session.c tests/unittests/xmpp/test_chat_session.h \
|
||||
tests/unittests/xmpp/test_contact.c tests/unittests/xmpp/test_contact.h \
|
||||
tests/unittests/config/test_preferences.c tests/unittests/config/test_preferences.h \
|
||||
tests/unittests/event/test_server_events.c tests/unittests/event/test_server_events.h \
|
||||
tests/unittests/xmpp/test_muc.c tests/unittests/xmpp/test_muc.h \
|
||||
tests/unittests/command/test_cmd_presence.c tests/unittests/command/test_cmd_presence.h \
|
||||
tests/unittests/command/test_cmd_alias.c tests/unittests/command/test_cmd_alias.h \
|
||||
tests/unittests/command/test_cmd_connect.c tests/unittests/command/test_cmd_connect.h \
|
||||
tests/unittests/command/test_cmd_rooms.c tests/unittests/command/test_cmd_rooms.h \
|
||||
tests/unittests/command/test_cmd_account.c tests/unittests/command/test_cmd_account.h \
|
||||
tests/unittests/command/test_cmd_sub.c tests/unittests/command/test_cmd_sub.h \
|
||||
tests/unittests/command/test_cmd_bookmark.c tests/unittests/command/test_cmd_bookmark.h \
|
||||
tests/unittests/command/test_cmd_otr.c tests/unittests/command/test_cmd_otr.h \
|
||||
tests/unittests/command/test_cmd_pgp.c tests/unittests/command/test_cmd_pgp.h \
|
||||
tests/unittests/command/test_cmd_join.c tests/unittests/command/test_cmd_join.h \
|
||||
tests/unittests/command/test_cmd_roster.c tests/unittests/command/test_cmd_roster.h \
|
||||
tests/unittests/command/test_cmd_disconnect.c tests/unittests/command/test_cmd_disconnect.h \
|
||||
tests/unittests/plugins/test_callbacks.c tests/unittests/plugins/test_callbacks.h \
|
||||
tests/unittests/plugins/test_plugins_disco.c tests/unittests/plugins/test_plugins_disco.h \
|
||||
tests/unittests/unittests.c
|
||||
|
||||
functionaltest_sources = \
|
||||
@@ -285,7 +285,7 @@ endif
|
||||
|
||||
TESTS = tests/unittests/unittests
|
||||
check_PROGRAMS = tests/unittests/unittests
|
||||
tests_unittests_unittests_CPPFLAGS = -I$(srcdir)/tests/
|
||||
tests_unittests_unittests_CPPFLAGS = -I$(srcdir)/tests/ -I$(srcdir)/tests/unittests
|
||||
tests_unittests_unittests_SOURCES = $(unittest_sources)
|
||||
tests_unittests_unittests_LDADD = -lcmocka
|
||||
|
||||
|
||||
50
meson.build
50
meson.build
@@ -605,31 +605,31 @@ if get_option('tests')
|
||||
'tests/unittests/tools/stub_aesgcm_download.c',
|
||||
'tests/unittests/tools/stub_plugin_download.c',
|
||||
'tests/unittests/helpers.c',
|
||||
'tests/unittests/test_form.c',
|
||||
'tests/unittests/xmpp/test_form.c',
|
||||
'tests/unittests/test_common.c',
|
||||
'tests/unittests/test_autocomplete.c',
|
||||
'tests/unittests/test_jid.c',
|
||||
'tests/unittests/test_parser.c',
|
||||
'tests/unittests/test_roster_list.c',
|
||||
'tests/unittests/test_chat_session.c',
|
||||
'tests/unittests/test_contact.c',
|
||||
'tests/unittests/test_preferences.c',
|
||||
'tests/unittests/test_server_events.c',
|
||||
'tests/unittests/test_muc.c',
|
||||
'tests/unittests/test_cmd_presence.c',
|
||||
'tests/unittests/test_cmd_alias.c',
|
||||
'tests/unittests/test_cmd_connect.c',
|
||||
'tests/unittests/test_cmd_rooms.c',
|
||||
'tests/unittests/test_cmd_account.c',
|
||||
'tests/unittests/test_cmd_sub.c',
|
||||
'tests/unittests/test_cmd_bookmark.c',
|
||||
'tests/unittests/test_cmd_otr.c',
|
||||
'tests/unittests/test_cmd_pgp.c',
|
||||
'tests/unittests/test_cmd_join.c',
|
||||
'tests/unittests/test_cmd_roster.c',
|
||||
'tests/unittests/test_cmd_disconnect.c',
|
||||
'tests/unittests/test_callbacks.c',
|
||||
'tests/unittests/test_plugins_disco.c',
|
||||
'tests/unittests/tools/test_autocomplete.c',
|
||||
'tests/unittests/xmpp/test_jid.c',
|
||||
'tests/unittests/tools/test_parser.c',
|
||||
'tests/unittests/xmpp/test_roster_list.c',
|
||||
'tests/unittests/xmpp/test_chat_session.c',
|
||||
'tests/unittests/xmpp/test_contact.c',
|
||||
'tests/unittests/config/test_preferences.c',
|
||||
'tests/unittests/event/test_server_events.c',
|
||||
'tests/unittests/xmpp/test_muc.c',
|
||||
'tests/unittests/command/test_cmd_presence.c',
|
||||
'tests/unittests/command/test_cmd_alias.c',
|
||||
'tests/unittests/command/test_cmd_connect.c',
|
||||
'tests/unittests/command/test_cmd_rooms.c',
|
||||
'tests/unittests/command/test_cmd_account.c',
|
||||
'tests/unittests/command/test_cmd_sub.c',
|
||||
'tests/unittests/command/test_cmd_bookmark.c',
|
||||
'tests/unittests/command/test_cmd_otr.c',
|
||||
'tests/unittests/command/test_cmd_pgp.c',
|
||||
'tests/unittests/command/test_cmd_join.c',
|
||||
'tests/unittests/command/test_cmd_roster.c',
|
||||
'tests/unittests/command/test_cmd_disconnect.c',
|
||||
'tests/unittests/plugins/test_callbacks.c',
|
||||
'tests/unittests/plugins/test_plugins_disco.c',
|
||||
'tests/unittests/unittests.c',
|
||||
)
|
||||
|
||||
@@ -666,7 +666,7 @@ if get_option('tests')
|
||||
'unittests',
|
||||
unittest_sources,
|
||||
dependencies: profanity_deps + [cmocka_dep],
|
||||
include_directories: [inc, include_directories('tests')],
|
||||
include_directories: [inc, include_directories('tests'), include_directories('tests/unittests')],
|
||||
build_by_default: false,
|
||||
)
|
||||
|
||||
|
||||
@@ -10,31 +10,31 @@
|
||||
#include "config.h"
|
||||
#include "xmpp/chat_session.h"
|
||||
#include "helpers.h"
|
||||
#include "test_autocomplete.h"
|
||||
#include "test_chat_session.h"
|
||||
#include "tools/test_autocomplete.h"
|
||||
#include "xmpp/test_chat_session.h"
|
||||
#include "test_common.h"
|
||||
#include "test_contact.h"
|
||||
#include "test_cmd_connect.h"
|
||||
#include "test_cmd_account.h"
|
||||
#include "test_cmd_rooms.h"
|
||||
#include "test_cmd_sub.h"
|
||||
#include "test_cmd_presence.h"
|
||||
#include "test_cmd_otr.h"
|
||||
#include "test_cmd_pgp.h"
|
||||
#include "test_jid.h"
|
||||
#include "test_parser.h"
|
||||
#include "test_roster_list.h"
|
||||
#include "test_preferences.h"
|
||||
#include "test_server_events.h"
|
||||
#include "test_cmd_alias.h"
|
||||
#include "test_cmd_bookmark.h"
|
||||
#include "test_cmd_join.h"
|
||||
#include "test_muc.h"
|
||||
#include "test_cmd_roster.h"
|
||||
#include "test_cmd_disconnect.h"
|
||||
#include "test_form.h"
|
||||
#include "test_callbacks.h"
|
||||
#include "test_plugins_disco.h"
|
||||
#include "xmpp/test_contact.h"
|
||||
#include "command/test_cmd_connect.h"
|
||||
#include "command/test_cmd_account.h"
|
||||
#include "command/test_cmd_rooms.h"
|
||||
#include "command/test_cmd_sub.h"
|
||||
#include "command/test_cmd_presence.h"
|
||||
#include "command/test_cmd_otr.h"
|
||||
#include "command/test_cmd_pgp.h"
|
||||
#include "xmpp/test_jid.h"
|
||||
#include "tools/test_parser.h"
|
||||
#include "xmpp/test_roster_list.h"
|
||||
#include "config/test_preferences.h"
|
||||
#include "event/test_server_events.h"
|
||||
#include "command/test_cmd_alias.h"
|
||||
#include "command/test_cmd_bookmark.h"
|
||||
#include "command/test_cmd_join.h"
|
||||
#include "xmpp/test_muc.h"
|
||||
#include "command/test_cmd_roster.h"
|
||||
#include "command/test_cmd_disconnect.h"
|
||||
#include "xmpp/test_form.h"
|
||||
#include "plugins/test_callbacks.h"
|
||||
#include "plugins/test_plugins_disco.h"
|
||||
|
||||
#define muc_unit_test(f) cmocka_unit_test_setup_teardown(f, muc_before_test, muc_after_test)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user