summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/tfile.cpp14
-rw-r--r--c++/test/th5s.cpp4
2 files changed, 10 insertions, 8 deletions
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index 4ff15ce..763f9f0 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -131,7 +131,7 @@ static void test_file_create()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "File already exists.");
}
- catch( FileIException E ) // catching creating existing file
+ catch (FileIException& E) // catching creating existing file
{} // do nothing, FAIL expected
// Test create with H5F_ACC_TRUNC. This will truncate the existing file.
@@ -145,7 +145,7 @@ static void test_file_create()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "H5F_ACC_TRUNC attempt on an opened file.");
}
- catch( FileIException E ) // catching truncating opened file
+ catch (FileIException& E) // catching truncating opened file
{} // do nothing, FAIL expected
// Try with H5F_ACC_EXCL. This should fail too because the file already
@@ -156,7 +156,7 @@ static void test_file_create()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "H5F_ACC_EXCL attempt on an existing file.");
}
- catch( FileIException E ) // catching H5F_ACC_EXCL on existing file
+ catch (FileIException& E) // catching H5F_ACC_EXCL on existing file
{} // do nothing, FAIL expected
// Get the file-creation template
@@ -336,7 +336,7 @@ static void test_file_open()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File constructor", "Attempt truncating an opened file.");
}
- catch( FileIException E ) // catching H5F_ACC_TRUNC on opened file
+ catch (FileIException& E) // catching H5F_ACC_TRUNC on opened file
{} // do nothing, FAIL expected
// Now, really close the file.
@@ -353,7 +353,8 @@ static void test_file_open()
PASSED();
} // end of try block
- catch( Exception E ) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_file_open()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_file_open()
@@ -411,7 +412,8 @@ static void test_file_size()
PASSED();
} // end of try block
- catch( Exception E ) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_file_size()", __LINE__, __FILE__, E.getCDetailMsg());
}
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 181c09f..7ef048b 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -178,7 +178,7 @@ static void test_h5s_basic()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("DataSpace constructor", "Library allowed overwrite of existing dataset");
}
- catch( DataSpaceIException E ) // Simple data space with too many dims
+ catch (DataSpaceIException& E) // Simple data space with too many dims
{} // do nothing, exception expected
/*
@@ -204,7 +204,7 @@ static void test_h5s_basic()
// Should FAIL but didn't, so throw an invalid action exception
throw InvalidActionException("H5File::openDataSet", "Opening a dataset with higher dimensionality than what the library can handle");
}
- catch( FileIException E ) // catching higher dimensionality dataset
+ catch (FileIException& E) // catching higher dimensionality dataset
{} // do nothing, exception expected
// CHECK_I(ret, "H5Fclose"); // leave this here, later, fake a failure