Added simple mock test, refactored roster

This commit is contained in:
James Booth
2013-12-14 15:34:17 +00:00
parent 3f6b40246a
commit 107fdd355e
30 changed files with 705 additions and 584 deletions

View File

@@ -18,6 +18,7 @@ core_sources = \
src/profanity.h src/chat_session.c \
src/chat_session.h src/muc.c src/muc.h src/jid.h src/jid.c \
src/resource.c src/resource.h \
src/roster_list.c src/roster_list.h \
src/xmpp/xmpp.h src/xmpp/capabilities.c src/xmpp/connection.c \
src/xmpp/iq.c src/xmpp/message.c src/xmpp/presence.c src/xmpp/stanza.c \
src/xmpp/stanza.h src/xmpp/message.h src/xmpp/iq.h src/xmpp/presence.h \
@@ -26,7 +27,7 @@ core_sources = \
src/xmpp/bookmark.c src/xmpp/bookmark.h \
src/ui/ui.h src/ui/window.c src/ui/window.h src/ui/core.c \
src/ui/titlebar.c src/ui/statusbar.c src/ui/inputwin.c \
src/ui/console.c src/ui/notifier.c src/ui/notifier.h \
src/ui/console.c src/ui/notifier.c \
src/ui/windows.c src/ui/windows.h \
src/ui/muc_window.c src/ui/muc_window.h \
src/command/command.h src/command/command.c src/command/history.c \
@@ -39,10 +40,47 @@ core_sources = \
src/config/preferences.c src/config/preferences.h \
src/config/theme.c src/config/theme.h
#test_sources = \
# src/contact.c src/contact.h src/log.c src/common.c \
# src/log.h src/profanity.c src/common.h \
# src/profanity.h src/chat_session.c \
# src/chat_session.h src/muc.c src/muc.h src/jid.h src/jid.c \
# src/resource.c src/resource.h \
# src/roster_list.c src/roster_list.h \
# src/xmpp/xmpp.h tests/xmpp/mock_xmpp.c \
# src/ui/ui.h tests/ui/mock_ui.c \
# src/command/command.h src/command/command.c src/command/history.c \
# src/command/history.h src/tools/parser.c \
# src/tools/parser.h \
# src/tools/autocomplete.c src/tools/autocomplete.h \
# src/tools/history.c src/tools/history.h \
# src/tools/tinyurl.c src/tools/tinyurl.h \
# src/config/accounts.c src/config/accounts.h \
# src/config/preferences.c src/config/preferences.h \
# src/config/theme.c src/config/theme.h \
# tests/test_roster_list.c tests/test_common.c tests/test_history.c \
# tests/test_autocomplete.c tests/testsuite.c tests/test_parser.c \
# tests/test_jid.c tests/test_command.c
test_sources = \
tests/test_roster.c tests/test_common.c tests/test_history.c \
tests/test_autocomplete.c tests/testsuite.c tests/test_parser.c \
tests/test_jid.c
src/contact.c src/contact.h src/log.c src/common.c \
src/log.h src/profanity.c src/common.h \
src/profanity.h src/chat_session.c \
src/chat_session.h src/muc.c src/muc.h src/jid.h src/jid.c \
src/resource.c src/resource.h \
src/roster_list.c src/roster_list.h \
src/xmpp/xmpp.h tests/xmpp/mock_xmpp.c \
src/ui/ui.h tests/ui/mock_ui.c \
src/command/command.h src/command/command.c src/command/history.c \
src/command/history.h src/tools/parser.c \
src/tools/parser.h \
src/tools/autocomplete.c src/tools/autocomplete.h \
src/tools/history.c src/tools/history.h \
src/tools/tinyurl.c src/tools/tinyurl.h \
src/config/accounts.c src/config/accounts.h \
src/config/preferences.c src/config/preferences.h \
src/config/theme.c src/config/theme.h \
tests/test_command.c
main_source = src/main.c
@@ -51,8 +89,10 @@ git_sources = \
if INCLUDE_GIT_VERSION
with_git_sources = $(git_sources) $(core_sources)
tests_with_git_sources = $(git_sources) $(test_sources)
else
with_git_sources = $(core_sources)
tests_with_git_sources = $(test_sources)
endif
bin_PROGRAMS = profanity
@@ -60,7 +100,7 @@ profanity_SOURCES = $(with_git_sources) $(main_source)
TESTS = tests/testsuite
check_PROGRAMS = tests/testsuite
tests_testsuite_SOURCES = $(with_git_sources) $(test_sources)
tests_testsuite_LDADD = -lheadunit -lstdc++
tests_testsuite_SOURCES = $(tests_with_git_sources)
tests_testsuite_LDADD = -lheadunit -lstdc++ -lcmocka
man_MANS = docs/profanity.1