1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-03 14:52:21 +02:00

Add test macro for comparing String to zero-terminated strings.

This macro avoids the need to wrap the first parameter in strPtr() and should improve readability.
This commit is contained in:
David Steele 2019-09-08 06:47:52 -04:00
parent 0a96764cb8
commit 051128ed9e

View File

@ -284,6 +284,9 @@ Macros to ease the use of common data types
#define TEST_RESULT_STR_NE(statement, resultExpected, ...) \
TEST_RESULT_STR_PARAM(statement, resultExpected, !=, __VA_ARGS__);
#define TEST_RESULT_STR_Z(statement, resultExpected, ...) \
TEST_RESULT_STR(strPtr(statement), resultExpected, __VA_ARGS__);
#define TEST_RESULT_U16_HEX(statement, resultExpected, ...) \
TEST_RESULT(statement, resultExpected, uint16_t, "%04X", TEST_TYPE_FORMAT, ==, TEST_TYPE_COMPARE, __VA_ARGS__);