mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 15:16:21 +00:00
Started work on chat session, and chat states
This commit is contained in:
25
tests/test_chat_session.c
Normal file
25
tests/test_chat_session.c
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <head-unit.h>
|
||||
#include "chat_session.h"
|
||||
|
||||
void can_init(void)
|
||||
{
|
||||
chat_session_init();
|
||||
assert_true(1);
|
||||
}
|
||||
|
||||
void adding_new_sets_state_to_active(void)
|
||||
{
|
||||
chat_session_init();
|
||||
chat_session_new("prof1@panesar");
|
||||
ChatSession session = chat_session_get("prof1@panesar");
|
||||
|
||||
assert_int_equals(ACTIVE, chat_session_get_state(session));
|
||||
}
|
||||
|
||||
void register_chat_session_tests(void)
|
||||
{
|
||||
TEST_MODULE("chat_session_tests");
|
||||
TEST(can_init);
|
||||
TEST(adding_new_sets_state_to_active);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ int main(void)
|
||||
register_contact_list_tests();
|
||||
register_common_tests();
|
||||
register_prof_autocomplete_tests();
|
||||
register_chat_session_tests();
|
||||
run_suite();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@ void register_prof_history_tests(void);
|
||||
void register_contact_list_tests(void);
|
||||
void register_common_tests(void);
|
||||
void register_prof_autocomplete_tests(void);
|
||||
void register_chat_session_tests(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user