From: Michael Tremer Date: Tue, 9 Nov 2021 11:39:00 +0000 (+0000) Subject: testsuite: Fix passing more arguments than possible to string X-Git-Tag: 0.9.28~886 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc8ec57f5214fd41a95df2493ac34c040103312f;p=pakfire.git testsuite: Fix passing more arguments than possible to string Signed-off-by: Michael Tremer --- diff --git a/tests/testsuite.h b/tests/testsuite.h index ee108563f..df544995c 100644 --- a/tests/testsuite.h +++ b/tests/testsuite.h @@ -127,13 +127,13 @@ int testsuite_run(); #define ASSERT_STRING_EQUALS(value, string) \ do { \ if (!value) { \ - LOG_ERROR("Failed assertion: " #value " is NULL, expected " #string " at %s:%d\n", \ - __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + LOG_ERROR("Failed assertion: %s is NULL, expected %s at %s:%d %s\n", \ + #value, #string, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ goto FAIL; \ } \ if (strcmp(string, value) != 0) { \ - LOG_ERROR("Failed assertion: " #value " (%s) != " #string " %s:%d %s\n", \ - value, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + LOG_ERROR("Failed assertion: " #value " (%s) != " #string " (%s) %s:%d %s\n", \ + value, string, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ goto FAIL; \ } \ } while (0)