summaryrefslogtreecommitdiffstats
path: root/test/tmeta.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-10 01:41:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-10 01:41:13 (GMT)
commit987f5d5e4de41c02b682464fa8e94252553ed57c (patch)
tree2bf74eb88dee718490af7b7dda0e585b0d1b8a95 /test/tmeta.c
parent12dca9ab3c362fc190feb330232bec4bd552df3c (diff)
downloadhdf5-987f5d5e4de41c02b682464fa8e94252553ed57c.zip
hdf5-987f5d5e4de41c02b682464fa8e94252553ed57c.tar.gz
hdf5-987f5d5e4de41c02b682464fa8e94252553ed57c.tar.bz2
[svn-r8048] Purpose:
Code cleanup & reorganization Description: Move further in the testing framework cleanup, eliminating all the global variables (moving them into testframe.c as static variables) from the testing framework code and moving it into the libh5test.a. Platforms tested: FreeBSD 4.9 (sleipnir) w & w/o thread-safety, c++ & parallel h5committested
Diffstat (limited to 'test/tmeta.c')
-rw-r--r--test/tmeta.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/test/tmeta.c b/test/tmeta.c
index 5651da9..a78859f 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -81,10 +81,8 @@ test_metadata(void)
unsigned u; /* local counting variable */
for (u = 0; u < sizeof(compar_buffer); u++) {
- if (compar_buffer[u] != encode_buffer[u]) {
- print_func("Error encoding meta-data at offset %u, wanted: %u, got: %u\n", (unsigned) u, (unsigned) compar_buffer[u], (unsigned) encode_buffer[u]);
- num_errs++;
- } /* end if */
+ if (compar_buffer[u] != encode_buffer[u])
+ TestErrPrintf("Error encoding meta-data at offset %u, wanted: %u, got: %u\n", (unsigned) u, (unsigned) compar_buffer[u], (unsigned) encode_buffer[u]);
} /* end for */
} /* end if */
/* Test decoding macros */
@@ -95,30 +93,22 @@ test_metadata(void)
UINT32DECODE(p, du32); /* Decode the uint32 value */
/* Check the values decoded */
- if (di16 != TEST_INT16_VALUE) {
- print_func("Error decoding int16 meta-data wanted: %d, got: %d "
+ if (di16 != TEST_INT16_VALUE)
+ TestErrPrintf("Error decoding int16 meta-data wanted: %d, got: %d "
"at %s:%d\n", (int) TEST_INT16_VALUE, (int) di16,
__FILE__, __LINE__);
- num_errs++;
- } /* end if */
- if (du16 != TEST_UINT16_VALUE) {
- print_func("Error decoding uint16 meta-data wanted: %u, got: %u "
+ if (du16 != TEST_UINT16_VALUE)
+ TestErrPrintf("Error decoding uint16 meta-data wanted: %u, got: %u "
"at %s:%d\n", (unsigned) TEST_UINT16_VALUE, (unsigned) du16,
__FILE__, __LINE__);
- num_errs++;
- } /* end if */
- if (di32 != TEST_INT32_VALUE) {
- print_func("Error decoding int32 meta-data wanted: %ld, got: %ld "
+ if (di32 != TEST_INT32_VALUE)
+ TestErrPrintf("Error decoding int32 meta-data wanted: %ld, got: %ld "
"at %s:%d\n", (long) TEST_INT32_VALUE, (long) di32,
__FILE__, __LINE__);
- num_errs++;
- } /* end if */
- if (du32 != TEST_UINT32_VALUE) {
- print_func("Error decoding uint32 meta-data wanted: %lu, got: %lu "
+ if (du32 != TEST_UINT32_VALUE)
+ TestErrPrintf("Error decoding uint32 meta-data wanted: %lu, got: %lu "
"at %s:%d\n", (unsigned long) TEST_UINT32_VALUE, (unsigned long) du32,
__FILE__, __LINE__);
- num_errs++;
- } /* end if */
} /* test_metadata() */