summaryrefslogtreecommitdiffstats
path: root/test/ros3.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-08 14:40:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-08 15:48:21 (GMT)
commitcdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3 (patch)
treed2effdc8a5999cb263ec0d0f607ed36d45fd3160 /test/ros3.c
parent29874423bf155e23cfdc1920336c91674865f417 (diff)
downloadhdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.zip
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.gz
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.bz2
Merge changes from develop
Comments and whitespace Skip file-locking and cache changes
Diffstat (limited to 'test/ros3.c')
-rw-r--r--test/ros3.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/test/ros3.c b/test/ros3.c
index 856160d..7ecba0e 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -193,15 +193,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), (reason)); \
}
/*----------------------------------------------------------------------------
@@ -232,15 +238,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
#ifdef JSVERIFY_EXP_ACT