Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: tests - give the tests names, using the new macros
The lists of test function declarations and of test functions to call was basically the same list. Use the new test macros to squash them into one list, and then chose to name all the tests, so that you can select which ones to run. This can simplify the debug cycle when some of the tests are lengthy. e.g.: phil@phil:~/repos/dovecot-core$ src/lib/test-lib --match crc crc32 ................................................................ : ok 0 / 1 tests failed src/lib is clearly the most complicated case, conversions of others where filtering would be useful should be trivial following this example. Signed-off-by: Phil Carmody <phil@dovecot.fi>
- Loading branch information
Phil Carmody
authored and
GitLab
committed
Aug 8, 2016
1 parent
d48ce43
commit 6335b1b
Showing
5 changed files
with
92 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* This file may be multiply-included, with different definitions of | ||
'TEST()' macro. This is sometimes called "the X trick" (as the | ||
macro is often imaginatively called X(). */ | ||
|
||
TEST(test_aqueue) | ||
TEST(test_array) | ||
FATAL(fatal_array) | ||
TEST(test_base32) | ||
TEST(test_base64) | ||
TEST(test_bits) | ||
TEST(test_bsearch_insert_pos) | ||
TEST(test_buffer) | ||
TEST(test_crc32) | ||
TEST(test_data_stack) | ||
FATAL(fatal_data_stack) | ||
TEST(test_failures) | ||
TEST(test_guid) | ||
TEST(test_hash) | ||
TEST(test_hash_format) | ||
TEST(test_hash_method) | ||
TEST(test_hex_binary) | ||
TEST(test_ioloop) | ||
TEST(test_iso8601_date) | ||
TEST(test_iostream_temp) | ||
TEST(test_istream) | ||
TEST(test_istream_base64_decoder) | ||
TEST(test_istream_base64_encoder) | ||
TEST(test_istream_chain) | ||
TEST(test_istream_concat) | ||
TEST(test_istream_crlf) | ||
TEST(test_istream_failure_at) | ||
TEST(test_istream_seekable) | ||
TEST(test_istream_tee) | ||
TEST(test_istream_unix) | ||
TEST(test_json_parser) | ||
TEST(test_json_tree) | ||
TEST(test_llist) | ||
TEST(test_log_throttle) | ||
TEST(test_mempool_alloconly) | ||
FATAL(fatal_mempool) | ||
TEST(test_net) | ||
TEST(test_numpack) | ||
TEST(test_ostream_escaped) | ||
TEST(test_ostream_failure_at) | ||
TEST(test_ostream_file) | ||
TEST(test_pkcs5_pbkdf2) | ||
TEST(test_primes) | ||
TEST(test_printf_format_fix) | ||
FATAL(fatal_printf_format_fix) | ||
TEST(test_priorityq) | ||
TEST(test_seq_range_array) | ||
TEST(test_str) | ||
TEST(test_strescape) | ||
TEST(test_strfuncs) | ||
TEST(test_strnum) | ||
TEST(test_str_find) | ||
TEST(test_str_sanitize) | ||
TEST(test_str_table) | ||
TEST(test_time_util) | ||
TEST(test_timing) | ||
TEST(test_unichar) | ||
TEST(test_utc_mktime) | ||
TEST(test_var_expand) | ||
TEST(test_wildcard_match) |