constexpr size_t IGNORE = static_cast<size_t>(-1);
-#define DEFINE_INVALID(type, name) \
+#define DEFINE_INVALID(type, name) \
constexpr type YACA_INVALID_##name = static_cast<type>(-1)
DEFINE_INVALID(yaca_error_e, ERROR);
BIO_reset_just_called = 0;
}
-#define HANDLE_FUNCTION(FNAME, VALUE, COND) \
- do { \
- if (GET_BOOL_NAME(FNAME)) { \
- GET_BOOL_NAME(FNAME) = 0; \
- return VALUE; \
- } \
- if (COND) { \
- reset_conditions(); \
- break; \
- } \
- reset_conditions(); \
- if (MOCK_fail_nth == 0) { \
- break; \
- } \
- --MOCK_fail_nth; \
- if (MOCK_fail_nth == 0) { \
- return VALUE; \
- } \
+#define HANDLE_FUNCTION(FNAME, VALUE, COND) \
+ do { \
+ if (GET_BOOL_NAME(FNAME)) { \
+ GET_BOOL_NAME(FNAME) = 0; \
+ return VALUE; \
+ } \
+ if (COND) { \
+ reset_conditions(); \
+ break; \
+ } \
+ reset_conditions(); \
+ if (MOCK_fail_nth == 0) { \
+ break; \
+ } \
+ --MOCK_fail_nth; \
+ if (MOCK_fail_nth == 0) { \
+ return VALUE; \
+ } \
} while(0)
/* This file is to be included in the source files that want to mockup
* OpenSSL and libc. After OpenSSL and libc headers. E.g.
-#include <openssl/...>
-#include <unistd.h>
+ #include <openssl/...>
+ #include <unistd.h>
-#ifdef OPENSSL_MOCKUP
-#include "../tests/openssl_mock_redefine.h"
-#endif
+ #ifdef OPENSSL_MOCKUP
+ #include "../tests/openssl_mock_redefine.h"
+ #endif
*/