/dovecot/src/lib/ |
H A D | test-wildcard-match.c | 10 } tests[] = { variable in typeref:struct:__anon76 44 for (i = 0; i < N_ELEMENTS(tests); i++) { 45 test_assert_idx(wildcard_match(tests[i].data, tests[i].mask) == tests[i].result, i);
|
H A D | test-hash-format.c | 24 static const struct hash_format_test tests[] = { local 45 for (i = 0; i < N_ELEMENTS(tests); i++) { 46 test_assert(hash_format_init(tests[i].input, &format, &error) == 0); 51 test_assert(strcmp(str_c(str), tests[i].output) == 0);
|
H A D | test-str-sanitize.c | 15 static const struct str_sanitize_test tests[] = { local 41 for (i = 0; i < N_ELEMENTS(tests); i++) { 42 str = str_sanitize(tests[i].str, tests[i].max_len); 43 if (tests[i].sanitized != NULL) 44 test_assert_idx(null_strcmp(str, tests[i].sanitized) == 0, i); 46 test_assert_idx(str == tests[i].str, i); 52 for (i = 0; i < N_ELEMENTS(tests); i++) { 53 if (tests[i].str == NULL) 57 str_sanitize_append(str2, tests[ [all...] |
H A D | test-istream-base64-decoder.c | 12 } tests[] = { variable in typeref:struct:__anon47 69 for (i = 0; i < N_ELEMENTS(tests); i++) { 71 decode_test(tests[i].input, tests[i].output, tests[i].stream_errno);
|
H A D | test-malloc-overflow.c | 9 } tests[] = { local 15 for (unsigned int i = 0; i < N_ELEMENTS(tests); i++) { 16 test_assert_idx(MALLOC_MULTIPLY(tests[i].a, tests[i].b) == tests[i].a * tests[i].b, i); 17 test_assert_idx(MALLOC_MULTIPLY(tests[i].b, tests[i].a) == tests[i].b * tests[ 26 } tests[] = { local [all...] |
H A D | test-murmurhash3.c | 17 unsigned int tests) 21 for(unsigned int i = 0; i < tests; i++) { 13 test_murmurhash3_algorithm(const char *name, void (*func)(const void*,size_t,uint32_t,unsigned char[]), size_t result_size, const struct murmur3_test_vectors *vectors, unsigned int tests) argument
|
H A D | test-utc-mktime.c | 13 static const struct test_utc_mktime tests[] = { local 45 for (i = 0; i < N_ELEMENTS(tests); i++) { 46 const struct test_utc_mktime *test = &tests[i];
|
/dovecot/src/lib-mail/ |
H A D | test-message-snippet.c | 13 } tests[] = { variable in typeref:struct:__anon117 77 for (i = 0; i < N_ELEMENTS(tests); i++) { 79 input = i_stream_create_from_data(tests[i].input, strlen(tests[i].input)); 80 test_assert_idx(message_snippet_generate(input, tests[i].max_snippet_chars, str) == 0, i); 81 test_assert_idx(strcmp(tests[i].output, str_c(str)) == 0, i);
|
H A D | test-mail-html2text.c | 12 } tests[] = { variable in typeref:struct:__anon115 58 for (i = 0; i < N_ELEMENTS(tests); i++) { 60 for (j = 0; tests[i].input[j] != '\0'; j++) { 61 unsigned char c = tests[i].input[j]; 64 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i);
|
H A D | test-message-date.c | 16 static const struct test_message_date tests[] = { local 46 for (i = 0; i < N_ELEMENTS(tests); i++) { 47 const struct test_message_date *test = &tests[i];
|
H A D | test-message-header-hash.c | 18 } tests[] = { variable in typeref:struct:__anon116 57 for (unsigned int i = 0; i < N_ELEMENTS(tests); i++) { 58 size_t input_len = tests[i].input == test_input_with_nuls ? 59 sizeof(test_input_with_nuls)-1 : strlen(tests[i].input); 63 tests[i].version, 64 (const unsigned char *)tests[i].input, 69 md5_update(&md5_ctx, tests[i].output, strlen(tests[i].output)); 78 unsigned char chr = tests[i].input[j]; 80 &md5_ctx, tests[ [all...] |
H A D | test-ostream-dot.c | 55 static struct dot_test tests[] = { local 66 for (i = 0; i < N_ELEMENTS(tests); i++) { 68 test_ostream_dot_one(&tests[i]);
|
H A D | test-qp-decoder.c | 19 static struct test_quoted_printable_decode_data tests[] = { local 51 for (i = 0; i < N_ELEMENTS(tests); i++) { 52 const char *input = tests[i].input; 65 test_assert_idx(ret == tests[i].ret, i); 66 test_assert_idx(ret == 0 || error_pos == tests[i].error_pos, i); 67 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 79 test_assert_idx(ret == tests[i].ret, i); 80 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i);
|
H A D | test-qp-encoder.c | 16 static struct test_quoted_printable_encode_data tests[] = { local 33 for (i = 0; i < N_ELEMENTS(tests); i++) { 34 const unsigned char *input = tests[i].input; 38 qp_encoder_more(qp, input, tests[i].input_len); 41 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 45 for (j = 0; j < tests[i].input_len; j++) { 50 test_assert_idx(strcmp(str_c(str), tests[i].output) == 0, i); 60 static struct test_quoted_printable_encode_data tests[] = { local 74 for (i = 0; i < N_ELEMENTS(tests); i++) { 75 const unsigned char *input = tests[ 101 static struct test_quoted_printable_encode_data tests[] = { local [all...] |
H A D | test-rfc822-parser.c | 13 } tests[] = { local 28 for (i = 0; i < N_ELEMENTS(tests); i++) { 29 rfc822_parser_init(&parser, (const void *)tests[i].input, 30 strlen(tests[i].input), NULL); 31 test_assert_idx(rfc822_parse_quoted_string(&parser, str) == tests[i].ret, i); 32 test_assert_idx(tests[i].ret < 0 || 33 strcmp(tests[i].output, str_c(str)) == 0, i);
|
H A D | test-istream-qp-decoder.c | 12 } tests[] = { variable in typeref:struct:__anon113 69 for (i = 0; i < N_ELEMENTS(tests); i++) { 72 decode_test(tests[i].input, tests[i].output, 73 tests[i].stream_errno, j);
|
H A D | test-istream-qp-encoder.c | 12 } tests[] = { variable in typeref:struct:__anon114 114 for (i = 0; i < N_ELEMENTS(tests); i++) { 117 encode_test(tests[i].input, tests[i].output, 118 tests[i].stream_errno, j);
|
/dovecot/src/plugins/pop3-migration/ |
H A D | test-pop3-migration-plugin.c | 16 } tests[] = { local 44 for (i = 0; i < N_ELEMENTS(tests); i++) { 45 input = i_stream_create_from_data(tests[i].input, 46 strlen(tests[i].input)); 48 test_assert_idx(strcasecmp(binary_to_hex(digest, sizeof(digest)), tests[i].sha1) == 0, i); 49 test_assert_idx(tests[i].have_eoh == have_eoh, i);
|
/dovecot/src/lib-index/ |
H A D | test-mail-index-modseq.c | 18 } tests[] = { local 72 test_assert_idx(mail_index_modseq_get_next_log_offset(view2, modseq, &log_seq, &log_offset) == (tests[modseq].log_seq != 0), modseq); 73 test_assert_idx(tests[modseq].log_seq == log_seq && tests[modseq].log_offset == log_offset, modseq);
|
/dovecot/src/lib-settings/ |
H A D | test-settings-parser.c | 12 } tests[] = { local 124 for (i = 0; i < N_ELEMENTS(tests); i++) { 125 test_assert_idx(settings_get_time(tests[i].input, &secs, &error) == 0, i); 126 test_assert_idx(secs == tests[i].output, i); 128 test_assert_idx(settings_get_time_msecs(tests[i].input, &msecs, &error) == 0, i); 129 test_assert_idx(msecs == tests[i].output*1000, i);
|
/dovecot/src/lib-storage/ |
H A D | test-mail-search-args-imap.c | 15 } tests[] = { variable in typeref:struct:__anon150 151 ioloop_time = CURRENT_UNIX_TIME; /* YOUNGER/OLDER tests need this */ 154 for (i = 0; i < N_ELEMENTS(tests); i++) { 155 args = test_build_search_args(tests[i].input); 156 output = tests[i].output != NULL ? 157 tests[i].output : tests[i].input;
|
/dovecot/src/plugins/quota/ |
H A D | test-quota-util.c | 19 static const struct test tests[] = { local 21 count and bytes tests: */ 33 /* these are for bytes tests: */ 55 for (i = 0; i < N_ELEMENTS(tests); i++) { 56 if (tests[i].new_size != 1) 60 ctx.count_used = tests[i].transaction_diff; 61 if (tests[i].initial_size > tests[i].limit) 62 ctx.count_over = tests[i].initial_size - tests[ [all...] |
/dovecot/src/auth/ |
H A D | test-auth-cache.c | 36 } tests[] = { local 59 for (i = 0; i < N_ELEMENTS(tests); i++) { 61 tests[i].in); 62 test_assert(strcmp(cache_key, tests[i].out) == 0);
|
/dovecot/src/lib-dns/ |
H A D | test-dns-util.c | 14 } tests[] = local 37 for(size_t i = 0; i < N_ELEMENTS(tests); i++) { 38 test_assert_idx(dns_compare(tests[i].a, tests[i].b) == tests[i].res, i); 39 test_assert_idx(dns_compare_labels(tests[i].a, tests[i].b) == tests[i].res, i); 51 } tests[] = local 68 for(size_t i = 0; i < N_ELEMENTS(tests); [all...] |
/dovecot/src/lib-imap/ |
H A D | test-imap-quote.c | 12 } tests[] = { local 38 for (i = 0; i < N_ELEMENTS(tests); i++) { 40 imap_append_string_for_humans(str, (const void *)tests[i].input, 41 strlen(tests[i].input)); 42 test_assert_idx(strcmp(tests[i].output, str_c(str)) == 0, i); 51 } tests[] = { local 80 for (i = 0; i < N_ELEMENTS(tests); i++) { 82 imap_append_astring(str, tests[i].input); 83 test_assert_idx(strcmp(tests[i].output, str_c(str)) == 0, i); 92 } tests[] local 119 } tests[] = { local [all...] |