hdf5/test/h5test.h
Robb Matzke bdf0dbf7ed [svn-r1697] Changes since 19990915
----------------------

./src/H5public.h
	We undefine a bunch of things that could get redefined in the config
	file because some customers have applications that include headers
	from multiple packages, all of which might be using autoconf.

	Include <stdint.h> for the C9x types.

./test/h5test.h
	More flushing of stdout for when testing is redirected down a pipe.

./tools/h5ls.c
	Added a `-S' or `--simple' switch which causes the output to be
	simplified somewhat for easier parsing by other scripts. For instance,
	characters are escaped using a very simple mechanism instead of C's
	more complicated backslash notation, data doesn't have `{}' or `[]'
	characters interspersed for compound and array types, and data is
	printed with exactly one element per line.  This switch is now used by
	an HDF5-to-HTML CGI script being developed for the DMF people.

./tools/h5tools.c
./tools/h5tools.h
	The repeat threshold which controls how strings are printed when a
	character repeats a bunch of times is now settable at runtime instead
	of compile time. The default is to show all characters, like

	   "abceeeeeeeeeeeeeeeeeeeeeeeeeeeeeefgh"

	But if you set it to something like 5 then any sequence of 5 or more
	characters is replaced by something shorter, like:

	   "abc" 'e'x30 "fgh"	  or

	Added an `str_locale' property which describes how to escape special
	characters in strings. The default is C-like escapes but an
	alternative is ESCAPE_HTML which replaces all non-alphanumeric
	characters with a 3-character HTML escape of the form `%XX'

	Fixed a bug where empty strings didn't even have the quote characters
	printed. Now empty strings show up as `""' instead of absolutely
	nothing.

	Added a `per_line' property which controls the maximum number of
	elements which will appear per line of output. The default is infinity
	but in practice the right margin causes line breaks. By setting the
	`per_line' value to one and the right margin to a very large value one
	can achieve output with exactly one element per line.
1999-09-30 11:14:14 -05:00

69 lines
1.9 KiB
C

/*
* Copyright © 1998 NCSA
* All rights reserved.
*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Friday, November 20, 1998
*
* Purpose: Test support stuff.
*/
#ifndef _H5TEST_H
#define _H5TEST_H
#undef NDEBUG
#include <hdf5.h>
#include <H5private.h>
#ifdef STDC_HEADERS
# include <signal.h>
#endif
#define H5T_PACKAGE
#include <H5Tpkg.h> /*to turn off hardware conversions*/
/*
* This array should contain a list of file base names created by the test.
* The base name is a word like `test' which will have a prefix and suffix
* added to result in something like `ufs:/u/matzke/test.h5'
*/
extern const char *FILENAME[];
/*
* The name of the test is printed by saying TESTING("something") which will
* result in the string `Testing something' being flushed to standard output.
* If a test passes, fails, or is skipped then the PASSED(), FAILED(), or
* SKIPPED() macro should be called. After FAILED() or SKIPPED() the caller
* should print additional information to stdout indented by at least four
* spaces. If the h5_errors() is used for automatic error handling then
* the FAILED() macro is invoked automatically when an API function fails.
*/
#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);}
#define PASSED() {puts(" PASSED");fflush(stdout);}
#define FAILED() {puts("*FAILED*");fflush(stdout);}
#define SKIPPED() {puts(" -SKIP-");fflush(stdout);}
/*
* Print the current location on the standard output stream.
*/
#define AT() printf (" at %s:%d in %s()...\n", \
__FILE__, __LINE__, __FUNCTION__);
#ifdef __cplusplus
extern "C" {
#endif
int h5_cleanup(hid_t fapl);
herr_t h5_errors(void *client_data);
char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
size_t size);
hid_t h5_fileaccess(void);
void h5_no_hwconv(void);
void h5_reset(void);
#ifdef __cplusplus
}
#endif
#endif