mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-25 17:00:45 +08:00
[svn-r36] ./test/testhdf5.c
./test/testhdf5.h ./test/tfile.c ./test/theap.c ./test/tmeta.c ./test/tohdr.c ./test/tstab.c Fixed include files. ./test/Makefile.in NEW ./test/Makefile Removed Makefile; it is now generated from Makefile.in by configure.
This commit is contained in:
parent
bc2b9d9dea
commit
bcbe95cad0
@ -43,14 +43,20 @@ static char RcsId[] = "@(#)$Revision$";
|
||||
#include <console.h>
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define MAXNUMOFTESTS 30
|
||||
#define HDF5_TEST_MASTER
|
||||
|
||||
/* Internal Variables */
|
||||
static int Index = 0;
|
||||
|
||||
/* Global variables */
|
||||
int num_errs;
|
||||
int Verbosity;
|
||||
|
||||
/* ANY new test needs to have a prototype in tproto.h */
|
||||
#include "testhdf5.h"
|
||||
#include <testhdf5.h>
|
||||
|
||||
struct TestStruct
|
||||
{
|
||||
|
@ -19,23 +19,14 @@
|
||||
#ifndef HDF5TEST_H
|
||||
#define HDF5TEST_H
|
||||
|
||||
/* Include required headers */
|
||||
#include "hdf5.h"
|
||||
#include <stdarg.h>
|
||||
/*
|
||||
* Include required headers. This file tests internal library functions,
|
||||
* so we include the private headers here.
|
||||
*/
|
||||
#include <H5private.h>
|
||||
|
||||
/* Define these for use in all the tests */
|
||||
#ifndef HDF5_TEST_MASTER
|
||||
extern
|
||||
#endif
|
||||
int num_errs
|
||||
#ifdef HDF5_TEST_MASTER
|
||||
= 0
|
||||
#endif
|
||||
, Verbosity
|
||||
#ifdef HDF5_TEST_MASTER
|
||||
= 0
|
||||
#endif
|
||||
;
|
||||
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 */
|
||||
|
20
test/tfile.c
20
test/tfile.c
@ -24,13 +24,17 @@ static char RcsId[] = "$Revision$";
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#include "testhdf5.h"
|
||||
#include "H5Bprivate.h"
|
||||
#include <testhdf5.h>
|
||||
|
||||
#define F1_USERBLOCK_SIZE HDF5_USERBLOCK_DEFAULT
|
||||
#define F1_OFFSET_SIZE HDF5_OFFSETSIZE_DEFAULT
|
||||
#define F1_LENGTH_SIZE HDF5_LENGTHSIZE_DEFAULT
|
||||
#define F1_SYM_LEAF_K HDF5_SYM_LEAF_K_DEFAULT
|
||||
#include <H5private.h>
|
||||
#include <H5Bprivate.h>
|
||||
#include <H5Cprivate.h>
|
||||
#include <H5Mprivate.h>
|
||||
|
||||
#define F1_USERBLOCK_SIZE H5C_USERBLOCK_DEFAULT
|
||||
#define F1_OFFSET_SIZE H5C_OFFSETSIZE_DEFAULT
|
||||
#define F1_LENGTH_SIZE H5C_LENGTHSIZE_DEFAULT
|
||||
#define F1_SYM_LEAF_K H5C_SYM_LEAF_K_DEFAULT
|
||||
#define F1_SYM_INTERN_K (btree_k_default_g[H5B_SNODE_ID])
|
||||
#define FILE1 "tfile1.h5"
|
||||
|
||||
@ -41,14 +45,14 @@ static char RcsId[] = "$Revision$";
|
||||
#define F2_SYM_INTERN_K 32
|
||||
#define FILE2 "tfile2.h5"
|
||||
|
||||
#define F3_USERBLOCK_SIZE HDF5_USERBLOCK_DEFAULT
|
||||
#define F3_USERBLOCK_SIZE H5C_USERBLOCK_DEFAULT
|
||||
#define F3_OFFSET_SIZE F2_OFFSET_SIZE
|
||||
#define F3_LENGTH_SIZE F2_LENGTH_SIZE
|
||||
#define F3_SYM_LEAF_K F2_SYM_LEAF_K
|
||||
#define F3_SYM_INTERN_K F2_SYM_INTERN_K
|
||||
#define FILE3 "tfile3.h5"
|
||||
|
||||
static const uintn btree_k_default_g[] = HDF5_BTREE_K_DEFAULT;
|
||||
static const uintn btree_k_default_g[] = H5C_BTREE_K_DEFAULT;
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
|
@ -14,11 +14,12 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "testhdf5.h"
|
||||
#include <testhdf5.h>
|
||||
|
||||
#include "H5ACprivate.h"
|
||||
#include "H5Fprivate.h"
|
||||
#include "H5Hprivate.h"
|
||||
#include <H5private.h>
|
||||
#include <H5ACprivate.h>
|
||||
#include <H5Fprivate.h>
|
||||
#include <H5Hprivate.h>
|
||||
|
||||
#define NOBJS 40
|
||||
|
||||
|
@ -24,7 +24,10 @@ static char RcsId[] = "$Revision$";
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#include "testhdf5.h"
|
||||
#include <testhdf5.h>
|
||||
|
||||
#include <H5private.h>
|
||||
#include <H5Fprivate.h>
|
||||
|
||||
#define TEST_INT16_VALUE -7641
|
||||
#define TEST_UINT16_VALUE 45002
|
||||
|
11
test/tohdr.c
11
test/tohdr.c
@ -14,12 +14,13 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "testhdf5.h"
|
||||
#include <testhdf5.h>
|
||||
|
||||
#include "H5ACprivate.h"
|
||||
#include "H5Fprivate.h"
|
||||
#include "H5Gprivate.h"
|
||||
#include "H5Oprivate.h"
|
||||
#include <H5private.h>
|
||||
#include <H5ACprivate.h>
|
||||
#include <H5Fprivate.h>
|
||||
#include <H5Gprivate.h>
|
||||
#include <H5Oprivate.h>
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
15
test/tstab.c
15
test/tstab.c
@ -14,12 +14,13 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "testhdf5.h"
|
||||
#include <testhdf5.h>
|
||||
|
||||
#include "H5ACprivate.h"
|
||||
#include "H5Fprivate.h"
|
||||
#include "H5Gprivate.h"
|
||||
#include "H5Oprivate.h"
|
||||
#include <H5private.h>
|
||||
#include <H5ACprivate.h>
|
||||
#include <H5Fprivate.h>
|
||||
#include <H5Gprivate.h>
|
||||
#include <H5Oprivate.h>
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -65,7 +66,7 @@ test_stab (void)
|
||||
* Create a directory that has so many entries that the root
|
||||
* of the B-tree ends up splitting.
|
||||
*/
|
||||
status = H5G_new (f, NULL, NULL, "/big", nsyms*10+2, &cwd);
|
||||
status = H5G_new (f, NULL, NULL, "/big", nsyms*12+2, &cwd);
|
||||
CHECK_I (status, "H5G_new");
|
||||
addr = H5G_stab_new (f, &sub, 0);
|
||||
CHECK_I (addr, "H5G_stab_new");
|
||||
@ -73,7 +74,7 @@ test_stab (void)
|
||||
|
||||
|
||||
for (i=0; i<nsyms; i++) {
|
||||
sprintf (name, "sub%05d", i);
|
||||
sprintf (name, "%05d%05d", rand()%100000, i);
|
||||
MESSAGE (8, print_func ("%s\n", name););
|
||||
#if 1
|
||||
status = H5G_insert (f, &cwd, NULL, name, &sub);
|
||||
|
Loading…
x
Reference in New Issue
Block a user