Tests: add helpers for read*

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2016-02-21 11:07:54 -08:00
parent 0a814db48f
commit c48283fe75
59 changed files with 377 additions and 603 deletions

View File

@@ -223,6 +223,48 @@ do { \
CU_ASSERT_EQUAL(_r, 0); \
} while (0);
#define READ10(...) \
do { \
int _r; \
_r = read10(__VA_ARGS__); \
if (_r == -2) { \
logging(LOG_NORMAL, "[SKIPPED] READ10 " \
"is not implemented."); \
CU_PASS("[SKIPPED] Target does not support " \
"READ10. Skipping test"); \
return; \
} \
CU_ASSERT_EQUAL(_r, 0); \
} while (0);
#define READ12(...) \
do { \
int _r; \
_r = read12(__VA_ARGS__); \
if (_r == -2) { \
logging(LOG_NORMAL, "[SKIPPED] READ12 " \
"is not implemented."); \
CU_PASS("[SKIPPED] Target does not support " \
"READ12. Skipping test"); \
return; \
} \
CU_ASSERT_EQUAL(_r, 0); \
} while (0);
#define READ16(...) \
do { \
int _r; \
_r = read16(__VA_ARGS__); \
if (_r == -2) { \
logging(LOG_NORMAL, "[SKIPPED] READ16 " \
"is not implemented."); \
CU_PASS("[SKIPPED] Target does not support " \
"READ16. Skipping test"); \
return; \
} \
CU_ASSERT_EQUAL(_r, 0); \
} while (0);
#define RECEIVE_COPY_RESULTS(...) \
do { \
int _r; \