summaryrefslogtreecommitdiffstats
path: root/c++/test/trefer.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 11:22:34 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 11:22:34 (GMT)
commitc37607eb58994041cbeaabdab5f1e9902794a3e9 (patch)
treeb96792d17d5bce03ad862b556f137a7b06c1449d /c++/test/trefer.cpp
parentc63f96d6e78cfe98de8001b662ec685467fd65df (diff)
downloadhdf5-c37607eb58994041cbeaabdab5f1e9902794a3e9.zip
hdf5-c37607eb58994041cbeaabdab5f1e9902794a3e9.tar.gz
hdf5-c37607eb58994041cbeaabdab5f1e9902794a3e9.tar.bz2
[svn-r29759] Purpose: Code improvements
Description: - Changed object in catch statements to reference - Replaced old-style casts or reinterpret_cast with static_cast - Removed unused name H5Library::need_cleanup - Removed Exception::printError from documentation Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/test/trefer.cpp')
-rw-r--r--c++/test/trefer.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 9d072be..1974541 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -144,19 +144,19 @@ test_reference_params(void)
/* Test parameters to H5Location::reference */
try {
file1->reference(NULL, "/Group1/Dataset1");
- } catch (ReferenceException E) {} // We expect this to fail
+ } catch (ReferenceException& E) {} // We expect this to fail
try {
file1->reference(&wbuf[0], NULL);
- } catch (ReferenceException E) {} // We expect this to fail
+ } catch (ReferenceException& E) {} // We expect this to fail
try {
file1->reference(&wbuf[0], "");
- } catch (ReferenceException E) {} // We expect this to fail
+ } catch (ReferenceException& E) {} // We expect this to fail
try {
file1->reference(&wbuf[0], "/Group1/Dataset1", H5R_MAXTYPE);
- } catch (ReferenceException E) {} // We expect this to fail
+ } catch (ReferenceException& E) {} // We expect this to fail
try {
file1->reference(&wbuf[0], "/Group1/Dataset1", H5R_DATASET_REGION);
- } catch (ReferenceException E) {} // We expect this to fail
+ } catch (ReferenceException& E) {} // We expect this to fail
// Close resources
dataset.close();
@@ -170,7 +170,8 @@ test_reference_params(void)
PASSED();
} // end try
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_reference_param()",__LINE__,__FILE__,
E.getCFuncName(), E.getCDetailMsg());
}
@@ -330,7 +331,7 @@ static void test_reference_obj(void)
try {
H5std_string read_comment_tmp = group.getComment(NULL);
}
- catch (Exception E) {} // We expect this to fail
+ catch (Exception& E) {} // We expect this to fail
// Close group
group.close();
@@ -361,7 +362,8 @@ static void test_reference_obj(void)
PASSED();
} // end try
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_reference_obj()",__LINE__,__FILE__,
E.getCFuncName(), E.getCDetailMsg());
}
@@ -489,7 +491,8 @@ test_reference_group(void)
PASSED();
} // end try
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_reference_group()",__LINE__,__FILE__,
E.getCFuncName(), E.getCDetailMsg());
}
@@ -780,7 +783,8 @@ test_reference_region_1D(void)
PASSED();
} // end try
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_reference_region_1D()",__LINE__,__FILE__,
E.getCFuncName(), E.getCDetailMsg());
}