2015-05-16 20:11:03 -04:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <cmocka.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "proftest.h"
|
|
|
|
#include "test_connect.h"
|
2015-05-28 15:02:16 -04:00
|
|
|
#include "test_ping.h"
|
|
|
|
#include "test_rooms.h"
|
2015-05-28 20:01:34 -04:00
|
|
|
#include "test_presence.h"
|
2015-05-30 19:12:13 -04:00
|
|
|
#include "test_message.h"
|
2015-05-16 20:11:03 -04:00
|
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
|
|
|
|
const UnitTest all_tests[] = {
|
2015-05-24 15:31:18 -04:00
|
|
|
|
2015-05-23 19:56:13 -04:00
|
|
|
unit_test_setup_teardown(connect_jid,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-26 20:06:17 -04:00
|
|
|
unit_test_setup_teardown(connect_jid_requests_roster,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(connect_jid_sends_presence_after_receiving_roster,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(connect_jid_requests_bookmarks,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(connect_bad_password,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 15:02:16 -04:00
|
|
|
unit_test_setup_teardown(connect_shows_presence_updates,
|
2015-05-27 14:48:25 -04:00
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 15:02:16 -04:00
|
|
|
|
|
|
|
unit_test_setup_teardown(ping_multiple,
|
2015-05-27 18:00:42 -04:00
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 15:02:16 -04:00
|
|
|
unit_test_setup_teardown(ping_responds,
|
2015-05-27 18:00:42 -04:00
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 15:02:16 -04:00
|
|
|
|
|
|
|
unit_test_setup_teardown(rooms_query,
|
2015-05-27 18:00:42 -04:00
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 20:01:34 -04:00
|
|
|
|
|
|
|
unit_test_setup_teardown(presence_away,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_away_with_message,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 20:10:45 -04:00
|
|
|
unit_test_setup_teardown(presence_online,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_online_with_message,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_xa,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_xa_with_message,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_dnd,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_dnd_with_message,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_chat,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_chat_with_message,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-28 20:22:24 -04:00
|
|
|
unit_test_setup_teardown(presence_set_priority,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(presence_includes_priority,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-30 17:44:41 -04:00
|
|
|
unit_test_setup_teardown(presence_received,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
2015-05-30 19:12:13 -04:00
|
|
|
|
|
|
|
unit_test_setup_teardown(message_send,
|
|
|
|
init_prof_test,
|
|
|
|
close_prof_test),
|
|
|
|
unit_test_setup_teardown(message_receive,
|
|
|
|
init_prof_test,
|
2015-05-31 18:44:19 -04:00
|
|
|
close_prof_test)
|
2015-05-16 20:11:03 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
return run_tests(all_tests);
|
|
|
|
}
|