void test_mutt_group_match(void)
{
// bool mutt_group_match(struct Group *g, const char *s);
+
+ {
+ TEST_CHECK(!mutt_group_match(NULL, "apple"));
+ }
+
+ {
+ struct Group group = { 0 };
+ TEST_CHECK(!mutt_group_match(&group, NULL));
+ }
}
void test_mutt_grouplist_add(void)
{
// void mutt_grouplist_add(struct GroupList *head, struct Group *group);
+
+ {
+ struct Group group = { 0 };
+ mutt_grouplist_add(NULL, &group);
+ TEST_CHECK_(1, "mutt_grouplist_add(NULL, &group)");
+ }
+
+ {
+ struct GroupList head = { 0 };
+ mutt_grouplist_add(&head, NULL);
+ TEST_CHECK_(1, "mutt_grouplist_add(&head, NULL)");
+ }
}
void test_mutt_grouplist_add_addrlist(void)
{
// void mutt_grouplist_add_addrlist(struct GroupList *head, struct Address *a);
+
+ {
+ struct Address addr = { 0 };
+ mutt_grouplist_add_addrlist(NULL, &addr);
+ TEST_CHECK_(1, "mutt_grouplist_add_addrlist(NULL, &addr)");
+ }
+
+ {
+ struct GroupList head = { 0 };
+ mutt_grouplist_add_addrlist(&head, NULL);
+ TEST_CHECK_(1, "mutt_grouplist_add_addrlist(&head, NULL)");
+ }
}
void test_mutt_grouplist_add_regex(void)
{
// int mutt_grouplist_add_regex(struct GroupList *head, const char *s, int flags, struct Buffer *err);
+
+ {
+ struct Buffer err = { 0 };
+ TEST_CHECK(mutt_grouplist_add_regex(NULL, "apple", 0, &err) == -1);
+ }
+
+ {
+ struct GroupList head = { 0 };
+ struct Buffer err = { 0 };
+ TEST_CHECK(mutt_grouplist_add_regex(&head, NULL, 0, &err) == -1);
+ }
+
+ {
+ struct GroupList head = { 0 };
+ TEST_CHECK(mutt_grouplist_add_regex(&head, "apple", 0, NULL) == 0);
+ }
}
void test_mutt_grouplist_clear(void)
{
// void mutt_grouplist_clear(struct GroupList *head);
+
+ {
+ mutt_grouplist_clear(NULL);
+ TEST_CHECK_(1, "mutt_grouplist_clear(NULL)");
+ }
}
void test_mutt_grouplist_destroy(void)
{
// void mutt_grouplist_destroy(struct GroupList *head);
+
+ {
+ mutt_grouplist_destroy(NULL);
+ TEST_CHECK_(1, "mutt_grouplist_destroy(NULL)");
+ }
}
void test_mutt_grouplist_remove_addrlist(void)
{
// int mutt_grouplist_remove_addrlist(struct GroupList *head, struct Address *a);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(mutt_grouplist_remove_addrlist(NULL, &addr) == -1);
+ }
+
+ {
+ struct GroupList head = { 0 };
+ TEST_CHECK(mutt_grouplist_remove_addrlist(&head, NULL) == -1);
+ }
}
void test_mutt_grouplist_remove_regex(void)
{
// int mutt_grouplist_remove_regex(struct GroupList *head, const char *s);
+
+ {
+ TEST_CHECK(mutt_grouplist_remove_regex(NULL, "apple") == -1);
+ }
+
+ {
+ struct GroupList head = { 0 };
+ TEST_CHECK(mutt_grouplist_remove_regex(&head, NULL) == -1);
+ }
}
void test_mutt_pattern_group(void)
{
// struct Group *mutt_pattern_group(const char *k);
+
+ {
+ TEST_CHECK(!mutt_pattern_group(NULL));
+ }
}