mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
4354606d1e
---------------------- ./src/H5T.c Fixed a typo in the registration of the `unsigned char' to `unsigned long long' type conversion that caused it to not be registered, falling back to software whenever that conversion path was taken. ./MANIFEST ./test/Makefile.in ./test/testhdf5.c ./test/testhdf5.h ./test/theap.c [REMOVED] ./test/lheap.c [NEW] ./test/tohdr.c [REMOVED] ./test/ohdr.c [NEW] ./test/tstab.c [REMOVED] ./test/stab.c [NEW] Removed the `t' from the front of these names and made each test a stand-alone program following the format of most of the other tests. ./test/big.c Uses libh5test.a but always sets the low-level driver to 1GB file family. The `#if' near the top to set the data space to 8GB has been simplified now that `long_long' is always defined and the error message is improved when `long_long' isn't wide enough. Cleanup code was added to the error handling. ./test/gheap.c ./test/istore.c Uses libh5test.a. Added error cleanup code. ./test/dtypes.c ./test/h5test.c Added 68 new tests that check hardware and software conversions between `long long' and `unsigned long long' and the other integer types. The tests only run on machines where sizeof(long_long)!=sizeof(long). We test a total of 180 different integer conversions, half in hardware and half in software. Cut down the number of times each test is run from 5 to 1 so it doesn't take so long. If you want to run more times there's a constant that can be changed at the top of the file. ./test/extend.c Removed unused variable. ./test/h5test.c ./test/h5test.h ./test/external.c ./test/fillval.c The h5_cleanup() returns true/false so it can be used in an `if' statement to clean up additional files. ./doc/html/Environment.html Indented. Added HDF5_PREFIX and HDF5_DRIVER descriptions. ./src/H5P.c Changed the trace type for the second argument from `Iu' to `x' since it's an output parameter. ./INSTALL Added a warning that the GNU zlib that comes with the latest version of HDF4 is too old to use with HDF5 and must be renamed so configure doesn't see it when `--enable-hdf4' is used.
138 lines
5.2 KiB
C
138 lines
5.2 KiB
C
/****************************************************************************
|
|
* NCSA HDF *
|
|
* Software Development Group *
|
|
* National Center for Supercomputing Applications *
|
|
* University of Illinois at Urbana-Champaign *
|
|
* 605 E. Springfield, Champaign IL 61820 *
|
|
* *
|
|
* For conditions of distribution and use, see the accompanying *
|
|
* hdf/COPYING file. *
|
|
* *
|
|
****************************************************************************/
|
|
|
|
/* $Id$ */
|
|
|
|
/*
|
|
* This header file contains information required for testing the HDF5 library.
|
|
*/
|
|
|
|
#ifndef HDF5TEST_H
|
|
#define HDF5TEST_H
|
|
|
|
/*
|
|
* Include required headers. This file tests internal library functions,
|
|
* so we include the private headers here.
|
|
*/
|
|
#include <H5private.h>
|
|
#include <H5Eprivate.h>
|
|
|
|
extern int num_errs;
|
|
extern int Verbosity;
|
|
|
|
/* Use %ld to print the value because long should cover most cases. */
|
|
/* 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++; \
|
|
H5Eprint (stdout); \
|
|
} \
|
|
H5Eclear(); \
|
|
} while(0)
|
|
|
|
#define CHECK_I(ret,where) { \
|
|
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)<0) { \
|
|
print_func ("*** UNEXPECTED RETURN from %s is %ld line %4d in %s\n", \
|
|
(where), (long)(ret), (int)__LINE__, __FILE__); \
|
|
H5Eprint (stdout); \
|
|
num_errs++; \
|
|
} \
|
|
H5Eclear (); \
|
|
}
|
|
|
|
#define CHECK_PTR(ret,where) { \
|
|
if (Verbosity>9) { \
|
|
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
|
|
(where), (int)__LINE__, __FILE__, (ret)); \
|
|
} \
|
|
if (!(ret)) { \
|
|
print_func ("*** UNEXPECTED RETURN from %s is NULL line %4d in %s\n", \
|
|
(where), (int)__LINE__, __FILE__); \
|
|
H5Eprint (stdout); \
|
|
num_errs++; \
|
|
} \
|
|
H5Eclear (); \
|
|
}
|
|
|
|
/* 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__); \
|
|
H5Eprint (stdout); \
|
|
num_errs++; \
|
|
} \
|
|
H5Eclear(); \
|
|
} while(0)
|
|
|
|
/* Used to document process through a test and to check for errors */
|
|
#define RESULT(ret,func) 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__); \
|
|
H5Eprint (stdout); \
|
|
num_errs++; \
|
|
} \
|
|
H5Eclear(); \
|
|
} while(0)
|
|
|
|
/* Used to document process through a test */
|
|
#define MESSAGE(V,A) {if (Verbosity>(V)) print_func A;}
|
|
|
|
/* definitions for command strings */
|
|
#define VERBOSITY_STR "Verbosity"
|
|
#define SKIP_STR "Skip"
|
|
#define TEST_STR "Test"
|
|
#define CLEAN_STR "Cleanup"
|
|
|
|
/* Prototypes for the support routines */
|
|
int print_func(const char *,...);
|
|
|
|
/* Prototypes for the test routines */
|
|
void test_metadata(void);
|
|
void test_file(void);
|
|
void test_h5t(void);
|
|
void test_h5s(void);
|
|
void test_h5d(void);
|
|
void test_attr(void);
|
|
void test_select(void);
|
|
void test_reference(void);
|
|
|
|
/* Prototypes for the cleanup routines */
|
|
void cleanup_metadata(void);
|
|
void cleanup_file(void);
|
|
void cleanup_h5s(void);
|
|
void cleanup_attr(void);
|
|
void cleanup_select(void);
|
|
void cleanup_reference(void);
|
|
|
|
#endif /* HDF5cleanup_H */
|