mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r147] ./test/dsets.c
./test/dtypes.c ./test/hyperslab.c ./test/istore.c Added a definition for __FUNCTION__. Changed a couple variable types. ./test/testhdf5.h The error stack is printed when something goes wrong.
This commit is contained in:
parent
e615fc7a98
commit
953979f4a0
@ -13,6 +13,9 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef HAVE_FUNCTION
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
#define AT() printf (" at %s:%d in %s()...\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
@ -41,7 +44,7 @@ static herr_t
|
||||
test_create (hid_t file)
|
||||
{
|
||||
hid_t dataset, space, create_parms;
|
||||
intn dims[2];
|
||||
size_t dims[2];
|
||||
herr_t status;
|
||||
size_t csize[2];
|
||||
|
||||
@ -206,7 +209,8 @@ test_simple_io (hid_t file)
|
||||
hid_t dataset, space;
|
||||
herr_t status;
|
||||
int points[100][200], check[100][200];
|
||||
int i, j, n, dims[2];
|
||||
int i, j, n;
|
||||
size_t dims[2];
|
||||
|
||||
printf ("%-70s", "Testing simple I/O");
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#ifndef HAVE_FUNCTION
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
#define AT() printf (" at %s:%d in %s()...\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
|
@ -15,6 +15,9 @@
|
||||
#include <H5MMprivate.h>
|
||||
#include <H5Vprivate.h>
|
||||
|
||||
#ifndef HAVE_FUNCTION
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
#define AT() printf (" at %s:%d in %s()\n",__FILE__,__LINE__,__FUNCTION__);
|
||||
|
||||
#define TEST_SMALL 0x0001
|
||||
|
@ -30,6 +30,9 @@
|
||||
#define TEST_MEDIUM 0x0002
|
||||
#define TEST_LARGE 0x0004
|
||||
|
||||
#ifndef HAVE_FUNCTION
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
#define AT() printf (" at %s:%d in %s()...\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
* so we include the private headers here.
|
||||
*/
|
||||
#include <H5private.h>
|
||||
#include <H5Eprivate.h>
|
||||
|
||||
extern int num_errs;
|
||||
extern int Verbosity;
|
||||
@ -32,7 +33,7 @@ extern int Verbosity;
|
||||
/* Used to make certain a return value _is_not_ a value */
|
||||
#define CHECK(ret, val, where) \
|
||||
do {if (Verbosity>9) print_func(" Call to routine: %15s at line %4d in %s returned %ld \n",where,(int)__LINE__,__FILE__,(long)ret);\
|
||||
if(ret == val) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in %s\n", where, (long)ret, (int)__LINE__,__FILE__); num_errs++;} \
|
||||
if(ret == val) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in %s\n", where, (long)ret, (int)__LINE__,__FILE__); num_errs++;H5Eprint (H5E_thrdid_g, stdout);} \
|
||||
} while(0)
|
||||
|
||||
#define CHECK_I(ret,where) { \
|
||||
@ -43,6 +44,7 @@ if(ret == val) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in
|
||||
if ((ret)<0) { \
|
||||
print_func ("*** UNEXPECTED RETURN from %s is %ld line %4d in %s\n", \
|
||||
(where), (long)(ret), (int)__LINE__, __FILE__); \
|
||||
H5Eprint (H5E_thrdid_g, stdout); \
|
||||
num_errs++; \
|
||||
} \
|
||||
}
|
||||
@ -55,6 +57,7 @@ if(ret == val) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in
|
||||
if (!(ret)) { \
|
||||
print_func ("*** UNEXPECTED RETURN from %s is NULL line %4d in %s\n", \
|
||||
(where), (int)__LINE__, __FILE__); \
|
||||
H5Eprint (H5E_thrdid_g, stdout); \
|
||||
num_errs++; \
|
||||
} \
|
||||
}
|
||||
@ -62,7 +65,7 @@ if(ret == val) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in
|
||||
/* Used to make certain a return value _is_ a value */
|
||||
#define VERIFY(x, val, where) \
|
||||
do {if (Verbosity>9) print_func(" Call to routine: %15s at line %4d in %s had value %ld \n",where,(int)__LINE__,__FILE__,(long)x);\
|
||||
if(x != val) {print_func("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\n", where, (long)x,(int)__LINE__,__FILE__); num_errs++;} \
|
||||
if(x != val) {print_func("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\n", where, (long)x,(int)__LINE__,__FILE__); H5Eprint (H5E_thrdid_g, stdout); num_errs++;} \
|
||||
} while(0)
|
||||
|
||||
/* Used to document process through a test and to check for errors */
|
||||
@ -70,7 +73,7 @@ if(x != val) {print_func("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\
|
||||
do { \
|
||||
if (Verbosity>8) print_func(" Call to routine: %15s at line %4d in %s returned %ld \n",func,(int)__LINE__,__FILE__,(long)ret); \
|
||||
if (Verbosity>9) HEprint(stdout,0); \
|
||||
if(ret == FAIL) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in %s\n", func, (long)ret,(int)__LINE__,__FILE__); num_errs++;} \
|
||||
if(ret == FAIL) {print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d in %s\n", func, (long)ret,(int)__LINE__,__FILE__); H5Eprint (H5E_thrdid_g, stdout); num_errs++;} \
|
||||
} while(0)
|
||||
|
||||
/* Used to document process through a test */
|
||||
|
Loading…
Reference in New Issue
Block a user