diff options
-rw-r--r-- | test/testhdf5.c | 8 | ||||
-rw-r--r-- | test/testhdf5.h | 25 | ||||
-rw-r--r-- | test/tfile.c | 20 | ||||
-rw-r--r-- | test/theap.c | 9 | ||||
-rw-r--r-- | test/tmeta.c | 5 | ||||
-rw-r--r-- | test/tohdr.c | 11 | ||||
-rw-r--r-- | test/tstab.c | 15 |
7 files changed, 50 insertions, 43 deletions
diff --git a/test/testhdf5.c b/test/testhdf5.c index 6d1cfc9..bee3bfb 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -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 { diff --git a/test/testhdf5.h b/test/testhdf5.h index ae83311..2a9af68 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -19,23 +19,14 @@ #ifndef HDF5TEST_H #define HDF5TEST_H -/* Include required headers */ -#include "hdf5.h" -#include <stdarg.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 - ; +/* + * Include required headers. This file tests internal library functions, + * so we include the private headers here. + */ +#include <H5private.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 */ diff --git a/test/tfile.c b/test/tfile.c index b6a6418..57a0df0 100644 --- a/test/tfile.c +++ b/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; /**************************************************************** ** diff --git a/test/theap.c b/test/theap.c index 0ab60f5..5237e4c 100644 --- a/test/theap.c +++ b/test/theap.c @@ -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 diff --git a/test/tmeta.c b/test/tmeta.c index 7ef7d73..567ab96 100644 --- a/test/tmeta.c +++ b/test/tmeta.c @@ -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 diff --git a/test/tohdr.c b/test/tohdr.c index 2f42f02..c1ecb0e 100644 --- a/test/tohdr.c +++ b/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> /*------------------------------------------------------------------------- diff --git a/test/tstab.c b/test/tstab.c index 81f8287..732e93a 100644 --- a/test/tstab.c +++ b/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); |