From 107fdd355e487793e53799ce3ebed0659263a2f7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 14 Dec 2013 15:34:17 +0000 Subject: Added simple mock test, refactored roster --- Makefile.am | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 88bed76f..e001a87e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 -- cgit 1.4.1-2-gfad0