Mercurial > dropbear
comparison libtomcrypt/tests/common.h @ 1739:13d834efc376 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 15 Oct 2020 19:55:15 +0800 |
parents | e9dba7abd939 |
children |
comparison
equal
deleted
inserted
replaced
1562:768ebf737aa0 | 1739:13d834efc376 |
---|---|
14 extern prng_state yarrow_prng; | 14 extern prng_state yarrow_prng; |
15 | 15 |
16 #ifdef LTC_VERBOSE | 16 #ifdef LTC_VERBOSE |
17 #define DO(x) do { fprintf(stderr, "%s:\n", #x); run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0) | 17 #define DO(x) do { fprintf(stderr, "%s:\n", #x); run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0) |
18 #define DOX(x, str) do { fprintf(stderr, "%s - %s:\n", #x, (str)); run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) | 18 #define DOX(x, str) do { fprintf(stderr, "%s - %s:\n", #x, (str)); run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) |
19 #define SHOULD_FAIL(x) do { fprintf(stderr, "%s:\n", #x); run_cmd((x) != CRYPT_OK ? CRYPT_OK : CRYPT_FAIL_TESTVECTOR, __LINE__, __FILE__, #x, NULL); } while (0) | |
19 #else | 20 #else |
20 #define DO(x) do { run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0) | 21 #define DO(x) do { run_cmd((x), __LINE__, __FILE__, #x, NULL); } while (0) |
21 #define DOX(x, str) do { run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) | 22 #define DOX(x, str) do { run_cmd((x), __LINE__, __FILE__, #x, (str)); } while (0) |
23 #define SHOULD_FAIL(x) do { run_cmd((x) != CRYPT_OK ? CRYPT_OK : CRYPT_FAIL_TESTVECTOR, __LINE__, __FILE__, #x, NULL); } while (0) | |
22 #endif | 24 #endif |
23 | 25 |
24 void run_cmd(int res, int line, const char *file, const char *cmd, const char *algorithm); | 26 void run_cmd(int res, int line, const char *file, const char *cmd, const char *algorithm); |
25 | 27 |
26 void print_hex(const char* what, const void* v, const unsigned long l); | 28 void print_hex(const char* what, const void* v, const unsigned long l); |