about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-17 00:11:00 +0000
committerJames Booth <boothj5@gmail.com>2013-02-17 00:11:00 +0000
commitab591b41b2535f454d35d7524c454dccea1b2cc5 (patch)
tree37f74657699c7a7f36f85eb1dcf8cce07e3d7cd6 /tests
parenta84e4adee718fbff87cbcb5a82fcb9496d701211 (diff)
downloadprofani-tty-ab591b41b2535f454d35d7524c454dccea1b2cc5.tar.gz
Fixed tests
Diffstat (limited to 'tests')
-rw-r--r--tests/test_contact_list.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/tests/test_contact_list.c b/tests/test_contact_list.c
index 58efa1e1..68c0891f 100644
--- a/tests/test_contact_list.c
+++ b/tests/test_contact_list.c
@@ -31,14 +31,14 @@ static void empty_list_when_none_added(void)
 
 static void contains_one_element(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     assert_int_equals(1, g_slist_length(list));
 }
 
 static void first_element_correct(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact james = list->data;
 
@@ -47,8 +47,8 @@ static void first_element_correct(void)
 
 static void contains_two_elements(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
 
     assert_int_equals(2, g_slist_length(list));
@@ -56,8 +56,8 @@ static void contains_two_elements(void)
 
 static void first_and_second_elements_correct(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
 
     PContact first = list->data;
@@ -69,9 +69,9 @@ static void first_and_second_elements_correct(void)
 
 static void contains_three_elements(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
 
     assert_int_equals(3, g_slist_length(list));
@@ -79,9 +79,9 @@ static void contains_three_elements(void)
 
 static void first_three_elements_correct(void)
 {
-    contact_list_add("Bob", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("James", NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact bob = list->data;
     PContact dave = (g_slist_next(list))->data;
@@ -94,10 +94,10 @@ static void first_three_elements_correct(void)
 
 static void add_twice_at_beginning_adds_once(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact first = list->data;
     PContact second = (g_slist_next(list))->data;
@@ -111,10 +111,10 @@ static void add_twice_at_beginning_adds_once(void)
 
 static void add_twice_in_middle_adds_once(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact first = list->data;
     PContact second = (g_slist_next(list))->data;
@@ -128,10 +128,10 @@ static void add_twice_in_middle_adds_once(void)
 
 static void add_twice_at_end_adds_once(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
-    contact_list_add("James", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact first = list->data;
     PContact second = (g_slist_next(list))->data;
@@ -145,7 +145,7 @@ static void add_twice_at_end_adds_once(void)
 
 static void test_show_online_when_no_value(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact james = list->data;
 
@@ -154,7 +154,7 @@ static void test_show_online_when_no_value(void)
 
 static void test_status_when_no_value(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
     GSList *list = get_contact_list();
     PContact james = list->data;
 
@@ -163,9 +163,9 @@ static void test_status_when_no_value(void)
 
 static void find_first_exists(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
 
     char *search = (char *) malloc(2 * sizeof(char));
     strcpy(search, "B");
@@ -178,9 +178,9 @@ static void find_first_exists(void)
 
 static void find_second_exists(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
 
     char *result = contact_list_find_contact("Dav");
     assert_string_equals("Dave", result);
@@ -189,9 +189,9 @@ static void find_second_exists(void)
 
 static void find_third_exists(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
 
     char *result = contact_list_find_contact("Ja");
     assert_string_equals("James", result);
@@ -200,9 +200,9 @@ static void find_third_exists(void)
 
 static void find_returns_null(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
 
     char *result = contact_list_find_contact("Mike");
     assert_is_null(result);
@@ -216,9 +216,9 @@ static void find_on_empty_returns_null(void)
 
 static void find_twice_returns_second_when_two_match(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Jamie", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamie", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
 
     char *result1 = contact_list_find_contact("Jam");
     char *result2 = contact_list_find_contact(result1);
@@ -229,16 +229,16 @@ static void find_twice_returns_second_when_two_match(void)
 
 static void find_five_times_finds_fifth(void)
 {
-    contact_list_add("Jama", NULL, NULL, FALSE);
-    contact_list_add("Jamb", NULL, NULL, FALSE);
-    contact_list_add("Mike", NULL, NULL, FALSE);
-    contact_list_add("Dave", NULL, NULL, FALSE);
-    contact_list_add("Jamm", NULL, NULL, FALSE);
-    contact_list_add("Jamn", NULL, NULL, FALSE);
-    contact_list_add("Matt", NULL, NULL, FALSE);
-    contact_list_add("Jamo", NULL, NULL, FALSE);
-    contact_list_add("Jamy", NULL, NULL, FALSE);
-    contact_list_add("Jamz", NULL, NULL, FALSE);
+    contact_list_add("Jama", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamb", NULL, NULL, NULL, FALSE);
+    contact_list_add("Mike", NULL, NULL, NULL, FALSE);
+    contact_list_add("Dave", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamm", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamn", NULL, NULL, NULL, FALSE);
+    contact_list_add("Matt", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamo", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamy", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamz", NULL, NULL, NULL, FALSE);
 
     char *result1 = contact_list_find_contact("Jam");
     char *result2 = contact_list_find_contact(result1);
@@ -255,9 +255,9 @@ static void find_five_times_finds_fifth(void)
 
 static void find_twice_returns_first_when_two_match_and_reset(void)
 {
-    contact_list_add("James", NULL, NULL, FALSE);
-    contact_list_add("Jamie", NULL, NULL, FALSE);
-    contact_list_add("Bob", NULL, NULL, FALSE);
+    contact_list_add("James", NULL, NULL, NULL, FALSE);
+    contact_list_add("Jamie", NULL, NULL, NULL, FALSE);
+    contact_list_add("Bob", NULL, NULL, NULL, FALSE);
 
     char *result1 = contact_list_find_contact("Jam");
     contact_list_reset_search_attempts();