summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/test/tfile.cpp13
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();