void test_mutt_env_cmp_strict(void)
{
// bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2);
+
+ {
+ struct Envelope envelope = { 0 };
+ TEST_CHECK(!mutt_env_cmp_strict(NULL, &envelope));
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ TEST_CHECK(!mutt_env_cmp_strict(&envelope, NULL));
+ }
}
void test_mutt_env_free(void)
{
// void mutt_env_free(struct Envelope **p);
+
+ {
+ mutt_env_free(NULL);
+ TEST_CHECK_(1, "mutt_env_free(NULL)");
+ }
+
+ {
+ struct Envelope *envelope = NULL;
+ mutt_env_free(&envelope);
+ TEST_CHECK_(1, "mutt_env_free(&envelope)");
+ }
}
void test_mutt_env_merge(void)
{
// void mutt_env_merge(struct Envelope *base, struct Envelope **extra);
+
+ {
+ struct Envelope envelope = { 0 };
+ struct Envelope *envp = &envelope;
+
+ mutt_env_merge(NULL, &envp);
+ TEST_CHECK_(1, "mutt_env_merge(NULL, &envp)");
+ }
+
+ {
+ struct Envelope base = { 0 };
+ mutt_env_merge(&base, NULL);
+ TEST_CHECK_(1, "mutt_env_merge(&base, NULL)");
+ }
+
+ {
+ struct Envelope base = { 0 };
+ struct Envelope *envp = NULL;
+ mutt_env_merge(&base, &envp);
+ TEST_CHECK_(1, "mutt_env_merge(&base, &envp)");
+ }
}
void test_mutt_env_to_intl(void)
{
// int mutt_env_to_intl(struct Envelope *env, const char **tag, char **err);
+
+ {
+ const char *tag = NULL;
+ char *err = NULL;
+ TEST_CHECK(mutt_env_to_intl(NULL, &tag, &err) == 1);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ char *err = NULL;
+ TEST_CHECK(mutt_env_to_intl(&envelope, NULL, &err) == 0);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ const char *tag = NULL;
+ TEST_CHECK(mutt_env_to_intl(&envelope, &tag, NULL) == 0);
+ }
}
void test_mutt_env_to_local(void)
{
// void mutt_env_to_local(struct Envelope *env);
+
+ {
+ mutt_env_to_local(NULL);
+ TEST_CHECK_(1, "mutt_env_to_local(NULL)");
+ }
}