diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-04-12 20:25:27 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-04-12 20:25:27 (GMT) |
commit | 6fc1d0535960edf24e66ca14afc27b31ec2320db (patch) | |
tree | 3b5cae467443e375c05433294137fe45c0d44717 /c++ | |
parent | 1285f6734c5916ce54104e05163b4114655d7954 (diff) | |
download | hdf5-6fc1d0535960edf24e66ca14afc27b31ec2320db.zip hdf5-6fc1d0535960edf24e66ca14afc27b31ec2320db.tar.gz hdf5-6fc1d0535960edf24e66ca14afc27b31ec2320db.tar.bz2 |
[svn-r20487] Bug 1386 - allow dimension size to be zero even though it isn't unlimited. This is a follow-up checkin for
r20440 and r20469:
1. 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.
2. I corrected the tests of Fortran and C++ for this problem.
Tested on heiwa, jam, and amani.
Diffstat (limited to 'c++')
-rw-r--r-- | c++/test/th5s.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index e63c9af..221a61b 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() @@ -204,28 +207,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 |