summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-04-13 16:14:16 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-04-13 16:14:16 (GMT)
commit2815eefb6b0ea608712e0abbc1d3db0910b4cd80 (patch)
tree94051a5190c521b35601a023cec1509867a72742 /c++
parent49a607c438d7e0135be61d4cb98d5de013f73fa3 (diff)
downloadhdf5-2815eefb6b0ea608712e0abbc1d3db0910b4cd80.zip
hdf5-2815eefb6b0ea608712e0abbc1d3db0910b4cd80.tar.gz
hdf5-2815eefb6b0ea608712e0abbc1d3db0910b4cd80.tar.bz2
[svn-r20489] Bug 1386 - allow dimension size to be zero even though it isn't unlimited. I brought the changes from the trunk as below:
1. I added test cases for contiguous, compact, and chunked, and external storage datasets, and also attribute. The test includes dataspace selections. 2. I added a test case of extending dataset of zero dimension size and shrinking back to zero dimension size. 3. I updated the Makefile to include the new data file to be cleaned up. 4. The dataspace code has another bug - when the maximal dimension isn't passed in for H5Sset_extent_simple, it is supposed to be same as the dimension. The current library sets NULL to it. I corrected it and added a test case to it. 5. I corrected the tests of Fortran and C++ for the problem in point 3. Tested on jam, heiwa, and amani.
Diffstat (limited to 'c++')
-rw-r--r--c++/test/th5s.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 7e9c9c3..e6ed440 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -110,6 +110,9 @@ int space5_data = 7;
* passed to verify_val to 'long' as well. If problems
* arises later, this will have to be specificly handled
* with a special routine.
+ * April 12, 2011: Raymond Lu
+ * Starting from the 1.8.7 release, we allow dimension
+ * size to be zero. So I took out the test against it.
*-------------------------------------------------------------------------
*/
static void test_h5s_basic()
@@ -210,28 +213,6 @@ static void test_h5s_basic()
// CHECK_I(ret, "H5Fclose"); // leave this here, later, fake a failure
// in the p_close see how this will handle it. - BMR
- // Verify that incorrect dimensions don't work
- dims1[0] = 0;
- try {
- DataSpace wrongdim_ds (SPACE1_RANK, dims1);
-
- // Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("DataSpace constructor", "Attempted to use incorrect dimensions");
- }
- catch( DataSpaceIException E ) // catching use of incorrect dimensions
- {} // do nothing, exception expected
-
- // Another incorrect dimension case
- DataSpace sid3 (H5S_SIMPLE);
- try {
- sid3.setExtentSimple( SPACE1_RANK, dims1 );
-
- // Should FAIL but didn't, so throw an invalid action exception
- throw InvalidActionException("DataSpace::setExtentSimple", "Attempted to use incorrect dimensions");
- }
- catch (DataSpaceIException E) // catching use of incorrect dimensions
- {} // do nothing, exception expected
-
PASSED();
} // end of try block