diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2013-08-12 20:11:51 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2013-08-12 20:11:51 (GMT) |
commit | aa8d6d403ce4855b8d357b1abfb8380482343bb5 (patch) | |
tree | a0e65ca4a44d33a73fe018162dda0ec8ddb42637 /c++/test/tfile.cpp | |
parent | a003143ded20bc0d3cc0da3b04170bf2a9602482 (diff) | |
download | hdf5-aa8d6d403ce4855b8d357b1abfb8380482343bb5.zip hdf5-aa8d6d403ce4855b8d357b1abfb8380482343bb5.tar.gz hdf5-aa8d6d403ce4855b8d357b1abfb8380482343bb5.tar.bz2 |
[svn-r23993] I used the macro H5_HAVE_FILE_VERSIONS to skip three test cases for file creation on OpenVMS.
OpenVMS creates another version of the file when a file is created for the second time, making
the test cases invalide.
Tested on OpenVMS and jam - simple change.
Diffstat (limited to 'c++/test/tfile.cpp')
-rw-r--r-- | c++/test/tfile.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 6e49162..765168c 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -109,8 +109,9 @@ static void test_file_create() file1 = new H5File (FILE1, H5F_ACC_EXCL); // try to create the same file with H5F_ACC_TRUNC. This should fail - // because file1 is the same file and is currently open. - + // because file1 is the same file and is currently open. Skip it on + // OpenVMS because it creates another version of the file. +#ifndef H5_HAVE_FILE_VERSIONS try { H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E @@ -119,6 +120,7 @@ static void test_file_create() } catch( FileIException E ) // catch truncating existing file {} // do nothing, FAIL expected +#endif /*H5_HAVE_FILE_VERSIONS*/ // Close file1 delete file1; @@ -139,7 +141,9 @@ static void test_file_create() file1 = new H5File (FILE1, H5F_ACC_TRUNC); // Try to truncate first file again. This should fail because file1 - // is the same file and is currently open. + // is the same file and is currently open. Skip it on OpenVMS because + // it creates another version of the file. +#ifndef H5_HAVE_FILE_VERSIONS try { H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E @@ -150,7 +154,7 @@ static void test_file_create() {} // do nothing, FAIL expected // Try with H5F_ACC_EXCL. This should fail too because the file already - // exists. + // exists. Skip it on OpenVMS because it creates another version of the file. try { H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E @@ -159,6 +163,7 @@ static void test_file_create() } catch( FileIException E ) // catching H5F_ACC_EXCL on existing file {} // do nothing, FAIL expected +#endif /*H5_HAVE_FILE_VERSIONS*/ // Get the file-creation template FileCreatPropList tmpl1 = file1->getCreatePlist(); |