summaryrefslogtreecommitdiffstats
path: root/test/tstab.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-09 16:47:25 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-09 16:47:25 (GMT)
commitbae16b355d04b0c25bca728cb19b3a998501663b (patch)
tree2414187c958e76914a434e8e0aab0faff4214b78 /test/tstab.c
parenta260c7849c1ca59bd32cde9d12380e89afd70770 (diff)
downloadhdf5-bae16b355d04b0c25bca728cb19b3a998501663b.zip
hdf5-bae16b355d04b0c25bca728cb19b3a998501663b.tar.gz
hdf5-bae16b355d04b0c25bca728cb19b3a998501663b.tar.bz2
[svn-r18] ./src/hdf5plat.h
Added defn for int64 and uint64 on irix. It seems to be wrong, but at least things compile and run. This file will go away with autoconf anyway. ./test/testhdf5.c ./test/Makefile Added tstab.c ./test/testhdf5.h Added tstab.c Fixed bugs with CHECK_I() and CHECK_PTR().
Diffstat (limited to 'test/tstab.c')
-rw-r--r--test/tstab.c77
1 files changed, 77 insertions, 0 deletions
diff --git a/test/tstab.c b/test/tstab.c
new file mode 100644
index 0000000..0b4c80c
--- /dev/null
+++ b/test/tstab.c
@@ -0,0 +1,77 @@
+/*-------------------------------------------------------------------------
+ * Copyright (C) 1997 National Center for Supercomputing Applications.
+ * All rights reserved.
+ *
+ *-------------------------------------------------------------------------
+ *
+ * Created: tstab.c
+ * Aug 7 1997
+ * Robb Matzke <matzke@llnl.gov>
+ *
+ * Purpose:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "testhdf5.h"
+
+#include "H5ACprivate.h"
+#include "H5Fprivate.h"
+#include "H5Gprivate.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_stab
+ *
+ * Purpose: Test symbol tables
+ *
+ * Return: void
+ *
+ * Programmer: Robb Matzke
+ * matzke@viper.llnl.gov
+ * Aug 7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+test_stab (void)
+{
+ hatom_t fid;
+ hdf5_file_t *f;
+ haddr_t addr;
+ H5G_entry_t root, sub;
+ int i;
+ char name[256];
+ herr_t status;
+
+ MESSAGE (5, print_func("Testing Symbol Tables\n"););
+
+ /* create the file */
+ fid = H5Fcreate ("tstab.h5", H5ACC_OVERWRITE, 0, 0);
+ CHECK (fid, FAIL, "H5Fcreate");
+ f = H5Aatom_object (fid);
+ CHECK (f, NULL, "H5Aatom_object");
+
+ /* create a new symbol table */
+ addr = H5G_stab_new (f, &root, 100);
+ CHECK_I (addr, "H5G_stab_new");
+ MESSAGE (8, print_func ("Root address is %lu\n", (unsigned long)addr););
+
+ /* create some empty symbol tables as objects in the root stab */
+ for (i=0; i<16384; i++) {
+ addr = H5G_stab_new (f, &sub, 0);
+ CHECK_I (addr, "H5G_stab_new");
+
+ sprintf (name, "sub%05d", i);
+ MESSAGE (8, print_func ("%s\n", name););
+ status = H5G_stab_insert (f, &root, name, &sub);
+ CHECK_I (status, "H5G_stab_insert");
+ }
+
+
+ /* close the file */
+ H5Fclose (fid);
+}