summaryrefslogtreecommitdiffstats
path: root/c++/test/tvlstr.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/tvlstr.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/tvlstr.cpp')
-rw-r--r--c++/test/tvlstr.cpp64
1 files changed, 35 insertions, 29 deletions
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index d5fea07..2421a87 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -40,16 +40,22 @@ const H5std_string FILENAME("tvlstr.h5");
const int SPACE1_RANK = 1;
const hsize_t SPACE1_DIM1 = 4;
-/****************************************************************
-**
-** test_vlstr_alloc_custom(): Test VL datatype custom memory
-** allocation routines. This routine just uses malloc to
-** allocate the memory and increments the amount of memory
-** allocated. It is passed into setVlenMemManager.
-**
-** Note: exact copy from the C version.
-** (Not used now)
-****************************************************************/
+/*-------------------------------------------------------------------------
+ * Function: test_vlstr_alloc_custom
+ *
+ * Purpose Test VL datatype custom memory allocation routines.
+ *
+ * Return None
+ *
+ * Description
+ * This routine just uses malloc to allocate the memory and
+ * increments the amount of memory allocated. It is passed
+ * into setVlenMemManager.
+ *
+ * Note: exact copy from the C version.
+ * (Not used now)
+ *-------------------------------------------------------------------------
+ */
#if 0 // not used now
static void *test_vlstr_alloc_custom(size_t size, void *info)
{
@@ -74,16 +80,22 @@ static void *test_vlstr_alloc_custom(size_t size, void *info)
}
#endif
-/****************************************************************
-**
-** test_vlstr_free_custom(): Test VL datatype custom memory
-** allocation routines. This routine just uses free to
-** release the memory and decrements the amount of memory
-** allocated. It is passed into setVlenMemManager.
-**
-** Note: exact copy from the C version.
-** (Not used now)
-****************************************************************/
+/*-------------------------------------------------------------------------
+ * Function: test_vlstr_free_custom
+ *
+ * Purpose Test VL datatype custom memory de-allocation routines.
+ *
+ * Return None
+ *
+ * Description
+ * This routine just uses free to release the memory and
+ * decrements the amount of memory allocated. It is passed
+ * into setVlenMemManager.
+ *
+ * Note: exact copy from the C version.
+ * (Not used now)
+ *-------------------------------------------------------------------------
+ */
#if 0 // not used now
static void test_vlstr_free_custom(void *_mem, void *info)
{
@@ -221,6 +233,7 @@ static void test_vlstring_dataset()
*-------------------------------------------------------------------------
*/
const H5std_string DSSTRARR_NAME("StringArray_dset");
+
static void test_vlstring_array_dataset()
{
const char *string_ds_array[SPACE1_DIM1]= {
@@ -440,6 +453,7 @@ static void test_vlstrings_special()
*-------------------------------------------------------------------------
*/
const H5std_string VLSTR_TYPE("vl_string_type");
+
static void test_vlstring_type()
{
// Output message about test being performed.
@@ -608,10 +622,7 @@ static void test_compact_vlstring()
*
*-------------------------------------------------------------------------
*/
-// String for writing to attribute
static char *string_att_write=NULL;
-
-// Info for a string attribute
const H5std_string ATTRSTR_NAME("String_attr");
const H5std_string ATTRSTR_DATA("String Attribute");
@@ -877,6 +888,7 @@ static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
*/
const H5std_string FILENAME2("tvlstr2.h5");
const int REWRITE_NDATASETS = 32;
+
static void test_vl_rewrite()
{
// Output message about test being performed
@@ -987,12 +999,6 @@ void test_vlstrings()
* Purpose Cleanup temporary test files
*
* Return none
- *
- * Programmer Quincey Koziol
- * September 10, 1999
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
extern "C"