summaryrefslogtreecommitdiffstats
path: root/c++/test/tvlstr.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-01-03 13:53:54 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-01-03 13:53:54 (GMT)
commit565aa10d8dcef5fc52aa14b2b16e4fc5e00b711f (patch)
treec9acf1fa5f01dccfbd2d3fbc0a8e4fb1956b9645 /c++/test/tvlstr.cpp
parentcd3bd5576f048ce1ca413921c76dcacf137d2110 (diff)
downloadhdf5-565aa10d8dcef5fc52aa14b2b16e4fc5e00b711f.zip
hdf5-565aa10d8dcef5fc52aa14b2b16e4fc5e00b711f.tar.gz
hdf5-565aa10d8dcef5fc52aa14b2b16e4fc5e00b711f.tar.bz2
Purpose: Add more tests
Description: Added more tests for the new constructors that replaced openXxxType() Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/test/tvlstr.cpp')
-rw-r--r--c++/test/tvlstr.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index d39d092..43dcc0b 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -479,10 +479,14 @@ static void test_vlstring_type()
vlst.close();
// Try opening datatype again.
- vlst = file1->openStrType(VLSTR_TYPE);
+ vlst = file1->openStrType(VLSTR_TYPE); // deprecated
- // Close datatype and file.
+ // Close again and reopen with constructor.
vlst.close();
+ StrType vlst1(*file1, VLSTR_TYPE);
+
+ // Close datatype and file.
+ vlst1.close();
file1->close();
delete file1;
@@ -490,16 +494,16 @@ static void test_vlstring_type()
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
// Open the variable-length string datatype just created
- vlst = file1->openStrType(VLSTR_TYPE);
+ StrType vlst2(*file1, VLSTR_TYPE);
// Verify character set and padding
- cset = vlst.getCset();
+ cset = vlst2.getCset();
verify_val(cset, H5T_CSET_ASCII, "StrType::getCset", __LINE__, __FILE__);
- pad = vlst.getStrpad();
+ pad = vlst2.getStrpad();
verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
// Close datatype and file
- vlst.close();
+ vlst2.close();
file1->close();
PASSED();