summaryrefslogtreecommitdiffstats
path: root/c++/test/tarray.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-12-04 18:21:12 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-12-04 18:21:12 (GMT)
commite33d677636b860f8f6b95c0ee3736395541a2610 (patch)
treed70dd01c6e75aa27ef6d286c553de06625aa0b8d /c++/test/tarray.cpp
parentf116545ce465181928ca97214b9cfa87092a3ee9 (diff)
downloadhdf5-e33d677636b860f8f6b95c0ee3736395541a2610.zip
hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.gz
hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.bz2
Various code cleanup
Description: - Replaced H5Location::exists with H5Location::nameExists and marked H5Location::exists as deprecated. - Miscellaneous test cleanup for consistency. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'c++/test/tarray.cpp')
-rw-r--r--c++/test/tarray.cpp58
1 files changed, 25 insertions, 33 deletions
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index a1de9c5..6bd4ca6 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -53,13 +53,10 @@ typedef enum int_t {
*
* Purpose Tests 1-D array of compound datatypes (with array fields)
*
- * Return None.
+ * Return None
*
* Programmer Binh-Minh Ribler (using C version)
* January, 2016
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_array_compound_array()
@@ -280,35 +277,33 @@ static void test_array_compound_array()
} // end test_array_compound_array()
+/*
+ * Helper routine to demonstrate the issue in HDFFV-9562
+ */
+H5::DataType getArr()
+{
+ hsize_t *dims = new hsize_t;
+ *dims = 5;
+ H5::ArrayType ret;
+ ret = H5::ArrayType(H5::PredType::NATIVE_INT, 1, dims);
+ delete[] dims;
+ return ret;
+}
+
/*-------------------------------------------------------------------------
* Function: test_array_assignment
*
* Purpose Tests the operator=
*
- * Return None.
+ * Return None
*
* Programmer Binh-Minh Ribler (using C version)
* March, 2016
*
* Description:
* Used user's sample code in HDFFV-9562
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-/*
- * Helper routine to demonstrate the issue in HDFFV-9562
- */
-H5::DataType getArr()
-{
- hsize_t *dims = new hsize_t;
- *dims = 5;
- H5::ArrayType ret;
- ret = H5::ArrayType(H5::PredType::NATIVE_INT, 1, dims);
- delete[] dims;
- return ret; }
-
static void test_array_assignment()
{
hsize_t sdims1[] = {SPACE1_DIM1};
@@ -359,13 +354,10 @@ static void test_array_assignment()
*
* Purpose Tests getting array information using the const methods.
*
- * Return None.
+ * Return None
*
* Programmer Binh-Minh Ribler
* April, 2016
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_array_info()
@@ -477,11 +469,14 @@ static void test_array_info()
} // end test_array_info()
-/****************************************************************
-**
-** test_array(): Main datatypes testing routine.
-**
-****************************************************************/
+/*-------------------------------------------------------------------------
+ * Function: test_array
+ *
+ * Purpose Main datatypes testing routine
+ *
+ * Return None
+ *-------------------------------------------------------------------------
+ */
extern "C"
void test_array()
{
@@ -505,13 +500,10 @@ void test_array()
*
* Purpose Cleanup temporary test files
*
- * Return none
+ * Return None
*
* Programmer Binh-Minh Ribler (using C version)
* January, 2016
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
extern "C"