From aa8d6d403ce4855b8d357b1abfb8380482343bb5 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Mon, 12 Aug 2013 15:11:51 -0500 Subject: [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. --- c++/test/tfile.cpp | 13 +++++++++---- 1 file 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(); -- cgit v0.12