void test_mutt_md5(void)
{
// void *mutt_md5(const char *str, void *buf);
+
+ {
+ char buf[32] = { 0 };
+ TEST_CHECK(!mutt_md5(NULL, &buf));
+ }
+
+ {
+ TEST_CHECK(!mutt_md5("apple", NULL));
+ }
}
void test_mutt_md5_bytes(void)
{
// void *mutt_md5_bytes(const void *buffer, size_t len, void *resbuf);
+
+ {
+ char buf[32] = { 0 };
+ mutt_md5_bytes(NULL, 10, &buf);
+ TEST_CHECK_(1, "mutt_md5_bytes(NULL, 10, &buf)");
+ }
+
+ {
+ char buf[32] = { 0 };
+ mutt_md5_bytes(&buf, 10, NULL);
+ TEST_CHECK_(1, "mutt_md5_bytes(&buf, 10, NULL)");
+ }
}
void test_mutt_md5_finish_ctx(void)
{
// void *mutt_md5_finish_ctx(struct Md5Ctx *md5ctx, void *resbuf);
+
+ {
+ char buf[32] = { 0 };
+ mutt_md5_finish_ctx(NULL, &buf);
+ TEST_CHECK_(1, "mutt_md5_finish_ctx(NULL, &buf)");
+ }
+
+ {
+ struct Md5Ctx md5ctx = { 0 };
+ mutt_md5_finish_ctx(&md5ctx, NULL);
+ TEST_CHECK_(1, "mutt_md5_finish_ctx(&md5ctx, NULL)");
+ }
}
void test_mutt_md5_init_ctx(void)
{
// void mutt_md5_init_ctx(struct Md5Ctx *md5ctx);
+
+ {
+ mutt_md5_init_ctx(NULL);
+ TEST_CHECK_(1, "mutt_md5_init_ctx(NULL)");
+ }
}
void test_mutt_md5_process(void)
{
// void mutt_md5_process(const char *str, struct Md5Ctx *md5ctx);
+
+ {
+ struct Md5Ctx md5ctx = { 0 };
+ mutt_md5_process(NULL, &md5ctx);
+ TEST_CHECK_(1, "mutt_md5_process(NULL, &md5ctx)");
+ }
+
+ {
+ mutt_md5_process("apple", NULL);
+ TEST_CHECK_(1, "mutt_md5_process(\"apple\", NULL)");
+ }
}
void test_mutt_md5_process_bytes(void)
{
// void mutt_md5_process_bytes(const void *buffer, size_t len, struct Md5Ctx *md5ctx);
+
+ {
+ struct Md5Ctx md5ctx = { 0 };
+ mutt_md5_process_bytes(NULL, 10, &md5ctx);
+ TEST_CHECK_(1, "mutt_md5_process_bytes(NULL, 10, &md5ctx)");
+ }
+
+ {
+ char buf[32] = { 0 };
+ mutt_md5_process_bytes(&buf, sizeof(buf), NULL);
+ TEST_CHECK_(1, "mutt_md5_process_bytes(&buf, sizeof(buf), NULL)");
+ }
}
void test_mutt_md5_toascii(void)
{
// void mutt_md5_toascii(const void *digest, char *resbuf);
+
+ {
+ char buf[32] = { 0 };
+ mutt_md5_toascii(NULL, buf);
+ TEST_CHECK_(1, "mutt_md5_toascii(NULL, &buf)");
+ }
+
+ {
+ mutt_md5_toascii("apple", NULL);
+ TEST_CHECK_(1, "mutt_md5_toascii(\"apple\", NULL)");
+ }
}