diff --git a/test/include/test.h b/test/include/test.h index 9af38aa7..496b866f 100644 --- a/test/include/test.h +++ b/test/include/test.h @@ -4,6 +4,8 @@ #include #include #include +#include +#include #define _STR(x) #x #define STR(x) _STR(x) @@ -21,8 +23,8 @@ typedef struct { #define TEST_CASE(name) { STR(name), name } #define THROW_ERROR(fmt, ...) do { \ - printf("\t\tERROR:" fmt " in func %s at line %d of file %s\n", \ - ##__VA_ARGS__, __func__, __LINE__, __FILE__); \ + printf("\t\tERROR:" fmt " in func %s at line %d of file %s with errno %d: %s\n", \ + ##__VA_ARGS__, __func__, __LINE__, __FILE__, errno, strerror(errno)); \ return -1; \ } while (0)