summaryrefslogtreecommitdiffstats
path: root/c++/test/tarray.cpp
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2017-12-01 18:41:26 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2017-12-01 18:41:26 (GMT)
commitb8c6b68c35fa2be23ef488a1d81097ff3ed55000 (patch)
treec3429ee577e454526c8704d66a84f0c45b7959a1 /c++/test/tarray.cpp
parent23a702e7bad93fc4f14eab07678c75d276e2d0ad (diff)
parent60f76980aab92f0e0730170b99a2363acd3c97fa (diff)
downloadhdf5-hdf5-1_8_20.zip
hdf5-hdf5-1_8_20.tar.gz
hdf5-hdf5-1_8_20.tar.bz2
Merge pull request #811 in HDFFV/hdf5 from hdf5_1_8_20 to 1.8/masterhdf5-1_8_20
* commit '60f76980aab92f0e0730170b99a2363acd3c97fa': (108 commits) Update version numbers and remove empty sections in RELEASE.txt. Restore line 1154: C2Cppfunction_map.mht to HTML_EXTRA_FILES. Update version for 1.8.20 release. Fixed documentation warnings HDFFV-10329 Correct LINK INTERFACE and VS20013 compile Switch default build mode from development to production. Increment version string to pre2. Add RELEASE.txt note for HDFFV-10274. (cherry picked from commit f7a7d0a00613cba997212fa8032091629a678797) Initialize hid_t variables in test_Attr_bug9. (cherry picked from commit 97bc393449f3fe02c5992872ab2842e12f611ef0) Fix HDFFV-10274. When deleting all (or almost all) of the messages in an object header chunk, where the total amount deleted was greater than 64K, an error would occur due to an off by one error in the code that handled that case. Fixed this and added a test case. (cherry picked from commit 1b2c2ca9a6a7d7e1fcd5c3302e203f2e2dabf0af) Fix linking of libs Changed file path to relative. iAdd NAG to supported compilers in RELEASE.txt. Add description to RELEASE.txt for HDFFV-10323 Correct issue number Set version to 1.8.20-pre1 Update supported and tested platforms in RELEASE.txt. HDFFV-10321 Merge from 1.8 Incremented lib file .so numbers: revision for all except c++ for code change; current incremented, revision and age set to 0 for c++ due to symbols added and removed. updated issues related to Fortran Incremented lib file .so numbers: revision for all except c++ for dcode change; current incremented, revision and age set to 0 for c++ due to symbols added and removed. ...
Diffstat (limited to 'c++/test/tarray.cpp')
-rw-r--r--c++/test/tarray.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index c07ba42..218e4e5 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -22,19 +22,17 @@
#else
#include <iostream>
#endif
-#include <string>
-
-#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
+using std::cerr;
+using std::endl;
+#include <string>
#include "H5Cpp.h" // C++ API header file
using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
const H5std_string FILENAME("tarray.h5");
+const H5std_string ARRAYTYPE_NAME("/Array type 1");
const int SPACE1_RANK = 1;
const hsize_t SPACE1_DIM1 = 4;
const int ARRAY1_RANK = 1;
@@ -60,8 +58,6 @@ typedef enum int_t {
* Programmer: Binh-Minh Ribler (using C version)
* January, 2016
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_array_compound_array()
@@ -131,9 +127,22 @@ static void test_array_compound_array()
// Write dataset to disk
dataset.write(wdata, arrtype);
+ // Test opening ArrayType with opening constructor (Dec 2016)
+
+ // Commit the arrtype to give it a name
+ arrtype.commit(file1, ARRAYTYPE_NAME);
+
+ // Close it, then re-open with the opening constructor
+ arrtype.close();
+ ArrayType named_type(file1, ARRAYTYPE_NAME);
+
+ // Get and verify the type's name
+ H5std_string type_name = named_type.getObjName();
+ verify_val(type_name, ARRAYTYPE_NAME, "DataType::getObjName tests constructor", __LINE__, __FILE__);
+ named_type.close();
+
// Close all
dataset.close();
- arrtype.close();
space.close();
file1.close();
@@ -282,8 +291,6 @@ static void test_array_compound_array()
* Description:
* Used user's sample code in HDFFV-9562
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/*
@@ -353,8 +360,6 @@ static void test_array_assignment()
* Programmer: Binh-Minh Ribler
* April, 2016
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_array_info()
@@ -499,8 +504,6 @@ void test_array()
* Programmer: Binh-Minh Ribler (using C version)
* January, 2016
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
extern "C"