[svn-r19240] Merge revision 19077 to 1.8.5 branch: bug with local heaps and H5Pset_sizes.
Tested: fedora
This commit is contained in:
26
test/lheap.c
26
test/lheap.c
@@ -20,6 +20,7 @@
|
||||
* Purpose: Test local heaps used by symbol tables (groups).
|
||||
*/
|
||||
#include "h5test.h"
|
||||
#include "H5srcdir.h"
|
||||
#include "H5ACprivate.h"
|
||||
#include "H5HLprivate.h"
|
||||
#include "H5Iprivate.h"
|
||||
@@ -29,6 +30,8 @@ const char *FILENAME[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
#define TESTFILE "tsizeslheap.h5"
|
||||
|
||||
#define NOBJS 40
|
||||
|
||||
|
||||
@@ -160,6 +163,29 @@ main(void)
|
||||
|
||||
if (H5Fclose(file)<0) goto error;
|
||||
PASSED();
|
||||
|
||||
/* Check opening existing file non-default sizes of lengths and addresses */
|
||||
TESTING("opening pre-created file with non-default sizes");
|
||||
{
|
||||
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
|
||||
hid_t dset = -1;
|
||||
|
||||
file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
|
||||
if(file >= 0){
|
||||
if((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0)
|
||||
TEST_ERROR
|
||||
if(H5Dclose(dset) < 0) TEST_ERROR
|
||||
if(H5Fclose(file) < 0) TEST_ERROR
|
||||
}
|
||||
else {
|
||||
H5_FAILED();
|
||||
printf("***cannot open the pre-created non-default sizes test file (%s)\n",
|
||||
testfile);
|
||||
goto error;
|
||||
} /* end else */
|
||||
}
|
||||
PASSED();
|
||||
|
||||
puts("All local heap tests passed.");
|
||||
h5_cleanup(FILENAME, fapl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user