mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Use expect_value == NULL for NULL parameters in tests
This commit is contained in:
parent
89f306ceb2
commit
f4d52f3d40
@ -350,7 +350,7 @@ expect_cons_show_contact_online(PContact contact, Resource *resource, GDateTime
|
||||
expect_memory(_mock_cons_show_contact_online, contact, contact, sizeof(contact));
|
||||
expect_memory(_mock_cons_show_contact_online, resource, resource, sizeof(Resource));
|
||||
if (last_activity == NULL) {
|
||||
expect_any(_mock_cons_show_contact_online, last_activity);
|
||||
expect_value(_mock_cons_show_contact_online, last_activity, NULL);
|
||||
} else {
|
||||
expect_memory(_mock_cons_show_contact_online, last_activity, last_activity, sizeof(last_activity));
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ jabber_connect_with_details_expect_and_return(char *jid,
|
||||
expect_string(_mock_jabber_connect_with_details, jid, jid);
|
||||
expect_string(_mock_jabber_connect_with_details, passwd, password);
|
||||
if (altdomain == NULL) {
|
||||
expect_any(_mock_jabber_connect_with_details, altdomain);
|
||||
expect_value(_mock_jabber_connect_with_details, altdomain, NULL);
|
||||
} else {
|
||||
expect_string(_mock_jabber_connect_with_details, altdomain, altdomain);
|
||||
}
|
||||
@ -264,7 +264,7 @@ expect_and_return_bookmark_add(char *expected_jid, char *expected_nick,
|
||||
if (expected_nick != NULL) {
|
||||
expect_string(_mock_bookmark_add, nick, expected_nick);
|
||||
} else {
|
||||
expect_any(_mock_bookmark_add, nick);
|
||||
expect_value(_mock_bookmark_add, nick, NULL);
|
||||
}
|
||||
expect_value(_mock_bookmark_add, autojoin, expected_autojoin);
|
||||
|
||||
@ -295,7 +295,7 @@ presence_join_room_expect(char *room, char *nick, char *passwd)
|
||||
expect_string(_mock_presence_join_room, room, room);
|
||||
expect_string(_mock_presence_join_room, nick, nick);
|
||||
if (passwd == NULL) {
|
||||
expect_any(_mock_presence_join_room, passwd);
|
||||
expect_value(_mock_presence_join_room, passwd, NULL);
|
||||
} else {
|
||||
expect_string(_mock_presence_join_room, passwd, passwd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user