dovecot-2.2: lib-imap: test-imap-utf7 - migrate to test_assert_idx

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 28 13:54:30 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/cfaeb58a0fbf
changeset: 17658:cfaeb58a0fbf
user:      Phil Carmody <phil at dovecot.fi>
date:      Mon Jul 28 16:49:47 2014 +0300
description:
lib-imap: test-imap-utf7 - migrate to test_assert_idx
Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/lib-imap/test-imap-utf7.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r e5157203e96d -r cfaeb58a0fbf src/lib-imap/test-imap-utf7.c
--- a/src/lib-imap/test-imap-utf7.c	Mon Jul 28 16:49:47 2014 +0300
+++ b/src/lib-imap/test-imap-utf7.c	Mon Jul 28 16:49:47 2014 +0300
@@ -34,17 +34,17 @@
 		if (tests[i].utf8 != NULL) {
 			str_truncate(dest, 0);
 			if (imap_utf8_to_utf7(tests[i].utf8, dest) < 0)
-				test_assert(tests[i].mutf7 == NULL);
+				test_assert_idx(tests[i].mutf7 == NULL, i);
 			else
-				test_assert(null_strcmp(tests[i].mutf7, str_c(dest)) == 0);
+				test_assert_idx(null_strcmp(tests[i].mutf7, str_c(dest)) == 0, i);
 		}
 		if (tests[i].mutf7 != NULL) {
 			str_truncate(dest, 0);
 			if (imap_utf7_to_utf8(tests[i].mutf7, dest) < 0)
-				test_assert(tests[i].utf8 == NULL);
+				test_assert_idx(tests[i].utf8 == NULL, i);
 			else
-				test_assert(null_strcmp(tests[i].utf8, str_c(dest)) == 0);
-			test_assert(imap_utf7_is_valid(tests[i].mutf7) != (tests[i].utf8 == NULL));
+				test_assert_idx(null_strcmp(tests[i].utf8, str_c(dest)) == 0, i);
+			test_assert_idx(imap_utf7_is_valid(tests[i].mutf7) != (tests[i].utf8 == NULL), i);
 		}
 	}
 
@@ -63,9 +63,9 @@
 			orig_src = t_strdup(str_c(src));
 			str_truncate(src, 0);
 
-			test_assert(imap_utf8_to_utf7(orig_src, dest) == 0);
-			test_assert(imap_utf7_to_utf8(str_c(dest), src) == 0);
-			test_assert(strcmp(str_c(src), orig_src) == 0);
+			test_assert_idx(imap_utf8_to_utf7(orig_src, dest) == 0, chr*100+i);
+			test_assert_idx(imap_utf7_to_utf8(str_c(dest), src) == 0, chr*100+i);
+			test_assert_idx(strcmp(str_c(src), orig_src) == 0, chr+100+i);
 		}
 	}
 	test_end();


More information about the dovecot-cvs mailing list