]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: test-imap-envelope - Use test_assert_idx() where possible
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 30 Jan 2024 20:42:50 +0000 (22:42 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 7 Aug 2024 11:55:39 +0000 (14:55 +0300)
src/lib-imap/test-imap-envelope.c

index 1f295e58bab39f95f6fbe38a8cabd578ca4d1dbe..c9b92b4be2b42ad916225e13344a0d2288fa8e45 100644 (file)
@@ -157,7 +157,7 @@ static void test_imap_envelope_write(void)
                envlp = msg_parse(pool, test->message);
 
                imap_envelope_write(envlp, str);
-               test_assert(strcmp(str_c(str), test->envelope) == 0);
+               test_assert_idx(strcmp(str_c(str), test->envelope) == 0, i);
 
                pool_unref(&pool);
                test_end();
@@ -179,12 +179,12 @@ static void test_imap_envelope_parse(void)
                test_begin(t_strdup_printf("imap envelope parser [%u]", i));
 
                ret = imap_envelope_parse(test->envelope, pool, &envlp, &error);
-               test_assert(ret);
+               test_assert_idx(ret, i);
 
                if (ret) {
                        str_truncate(str, 0);
                        imap_envelope_write(envlp, str);
-                       test_assert(strcmp(str_c(str), test->envelope) == 0);
+                       test_assert_idx(strcmp(str_c(str), test->envelope) == 0, i);
                } else {
                        i_error("Invalid envelope: %s", error);
                }