X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0223a8a4b44cc21969cde92ed4a67684c08fce7e..aaae9cab01b8d7a0e6cf0c273182a51fd03a9d61:/symm/hash.h diff --git a/symm/hash.h b/symm/hash.h index 31cf4a85..f4925184 100644 --- a/symm/hash.h +++ b/symm/hash.h @@ -165,7 +165,7 @@ #define HASH_BUFLEN 100000 -#define HASH_TEST(PRE, pre) \ +#define HASH_TESTX(PRE, pre, name, fname) \ \ static int verify(dstr *v) \ { \ @@ -251,8 +251,8 @@ static int verifyrep(dstr *v) \ } \ \ static test_chunk defs[] = { \ - { #pre, verify, { &type_string, &type_hex, 0 } }, \ - { #pre "-rep", verifyrep, \ + { name, verify, { &type_string, &type_hex, 0 } }, \ + { name "-rep", verifyrep, \ { &type_string, &type_int, &type_hex, 0 } }, \ { 0, 0, { 0 } } \ }; \ @@ -260,14 +260,16 @@ static test_chunk defs[] = { \ int main(int argc, char *argv[]) \ { \ ego(argv[0]); \ - test_run(argc, argv, defs, SRCDIR"/t/" #pre); \ + test_run(argc, argv, defs, SRCDIR"/t/" fname); \ return (0); \ } #else -# define HASH_TEST(PRE, pre) +# define HASH_TESTX(PRE, pre, name, fname) #endif +#define HASH_TEST(PRE, pre) HASH_TESTX(PRE, pre, #pre, #pre) + /*----- That's all, folks -------------------------------------------------*/ #ifdef __cplusplus