summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-04-08 21:23:19 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-04-08 21:23:19 (GMT)
commit1dad73cae06c8dcc396db690b9d0ebb28fa8cd65 (patch)
treec76936160c89c3bebe1d90f79836a6842a9022c2 /test/tmisc.c
parent270d097bd1a6ab00e8e90c214a47a33d26d19bd5 (diff)
downloadhdf5-1dad73cae06c8dcc396db690b9d0ebb28fa8cd65.zip
hdf5-1dad73cae06c8dcc396db690b9d0ebb28fa8cd65.tar.gz
hdf5-1dad73cae06c8dcc396db690b9d0ebb28fa8cd65.tar.bz2
[svn-r8331] Purpose: Last step of check-in for Null dataspace
Description: Mainly are header message changes for dataspace. In last round of check-in, a new header message for dataspace to created, which is not a good way. Now, there will be no new message for dataspace, but just add the type of dataspace in the message while increment its version number. Backward compatibility is addressed. The attribute design is modified accordingly. Took out Null dataspace test from tmisc.c and put it in th5s.c. Platforms tested: h5committest
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index 92dc2de..87534fa 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -217,10 +217,6 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset
#define MISC19_ATTR_NAME "Attribute"
#define MISC19_GROUP_NAME "Group"
-/* Definitions for misc. test #20 */
-#define MISC20_FILE "tmisc20.h5"
-#define MISC20_DSET_NAME "Dataset"
-
/****************************************************************
**
** test_misc1(): test unlinking a dataset from a group and immediately
@@ -3289,83 +3285,6 @@ test_misc19(void)
VERIFY(ret, FAIL, "H5Eclose_stack");
} /* end test_misc19() */
-
-/****************************************************************
-**
-** test_misc20(): Test NULL data space
-**
-****************************************************************/
-static void
-test_misc20(void)
-{
- hid_t fid; /* File ID */
- hid_t sid, sid2; /* Dataspace IDs */
- hid_t did; /* Dataset ID */
- H5S_class_t class; /* dataspace type */
- herr_t ret; /* Generic return value */
-
- /* Create the file */
- fid = H5Fcreate(MISC20_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fcreate");
-
- sid = H5Screate(H5S_NULL);
- CHECK(sid, FAIL, "H5Screate");
-
- /* Create first dataset */
- did = H5Dcreate(fid, MISC20_DSET_NAME, H5T_STD_U32LE, sid, H5P_DEFAULT);
- CHECK(did, FAIL, "H5Dcreate");
-
- /* Close the dataset */
- ret = H5Dclose(did);
- CHECK(ret, FAIL, "H5Dclose");
-
- /* Close the dataspace */
- ret = H5Sclose(sid);
- CHECK(ret, FAIL, "H5Sclose");
-
- /* Close the file */
- ret = H5Fclose(fid);
- CHECK(ret, FAIL, "H5Fclose");
-
- /* Reopen the file to check the data space */
- fid = H5Fopen(MISC20_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fopen");
-
- /* Reopen the dataset */
- did = H5Dopen(fid, MISC20_DSET_NAME);
- CHECK(did, FAIL, "H5Dopen");
-
- /* Get the space of the dataset */
- sid = H5Dget_space(did);
- CHECK(sid, FAIL, "H5Dget_space");
-
- /* Query the NULL dataspace */
- sid2 = H5Scopy(sid);
- CHECK(sid2, FAIL, "H5Scopy");
-
- /* Verify the class type of dataspace */
- class = H5Sget_simple_extent_type(sid2);
- VERIFY(class, H5S_NULL, "H5Sget_simple_extent_type");
-
- /* Verify there is zero element in the dataspace */
- ret = H5Sget_simple_extent_npoints(sid2);
- VERIFY(ret, 0, "H5Sget_simple_extent_npoints");
-
- /* Close the dataset */
- ret = H5Dclose(did);
- CHECK(ret, FAIL, "H5Dclose");
-
- /* Close the dataspace */
- ret = H5Sclose(sid);
- CHECK(ret, FAIL, "H5Sclose");
-
- ret = H5Sclose(sid2);
- CHECK(ret, FAIL, "H5Sclose");
-
- /* Close the file */
- ret = H5Fclose(fid);
- CHECK(ret, FAIL, "H5Fclose");
-} /* end test_misc20() */
/****************************************************************
**
@@ -3397,7 +3316,6 @@ test_misc(void)
test_misc17(); /* Test array of ASCII character */
test_misc18(); /* Test new object header information in H5G_stat_t struct */
test_misc19(); /* Test incrementing & decrementing ref count on IDs */
- test_misc20(); /* Test NULL data space */
} /* test_misc() */