summaryrefslogtreecommitdiffstats
path: root/c++/test/tlinks.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/tlinks.cpp
parent23a702e7bad93fc4f14eab07678c75d276e2d0ad (diff)
parent60f76980aab92f0e0730170b99a2363acd3c97fa (diff)
downloadhdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.zip
hdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.tar.gz
hdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.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/tlinks.cpp')
-rw-r--r--c++/test/tlinks.cpp79
1 files changed, 35 insertions, 44 deletions
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 1328a19..b38ed39 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -22,13 +22,10 @@
#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;
@@ -44,9 +41,9 @@ using namespace H5;
//#define H5G_TESTING
//#include "h5test.h"
-//#include "H5Gpkg.h" /* Groups */
-//#include "H5Iprivate.h" /* IDs */
-//#include "H5Lprivate.h" /* Links */
+//#include "H5Gpkg.h" // Groups
+//#include "H5Iprivate.h" // IDs
+//#include "H5Lprivate.h" // Links
/* File for external link test. Created with gen_udlinks.c */
#define LINKED_FILE "be_extlink2.h5"
@@ -117,22 +114,22 @@ const char *FILENAME[] = {
#define MAX_NAME_LEN ((64*1024)+1024)
/* Link type IDs */
-#define UD_HARD_TYPE 201
-#define UD_CB_TYPE H5L_TYPE_MAX
-#define UD_PLIST_TYPE 128
-#define UD_CBFAIL_TYPE UD_PLIST_TYPE
-#define UD_ERROR_TYPE 189
-#define UD_BAD_TYPE1 H5L_TYPE_HARD
-#define UD_BAD_TYPE2 (H5L_TYPE_UD_MIN - 5)
-#define UD_BAD_VERS (H5L_LINK_CLASS_T_VERS + 1)
-
-#define DEST_PROP_NAME "destination_group"
-#define REREG_TARGET_NAME "rereg_target"
-
-#define UD_CB_LINK_NAME "ud_callback_link"
+#define UD_HARD_TYPE 201
+#define UD_CB_TYPE H5L_TYPE_MAX
+#define UD_PLIST_TYPE 128
+#define UD_CBFAIL_TYPE UD_PLIST_TYPE
+#define UD_ERROR_TYPE 189
+#define UD_BAD_TYPE1 H5L_TYPE_HARD
+#define UD_BAD_TYPE2 (H5L_TYPE_UD_MIN - 5)
+#define UD_BAD_VERS (H5L_LINK_CLASS_T_VERS + 1)
+
+#define DEST_PROP_NAME "destination_group"
+#define REREG_TARGET_NAME "rereg_target"
+
+#define UD_CB_LINK_NAME "ud_callback_link"
#define NEW_UD_CB_LINK_NAME "ud_callback_link2"
-#define UD_CB_TARGET "ud_target"
-#define UD_CB_TARGET_LEN 10
+#define UD_CB_TARGET "ud_target"
+#define UD_CB_TARGET_LEN 10
#define LE_FILENAME "le_extlink1.h5"
#define BE_FILENAME "be_extlink1.h5"
@@ -145,9 +142,9 @@ const char *FILENAME[] = {
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
#define CORDER_SOFT_GROUP_NAME "corder_soft_group"
-#define CORDER_NLINKS 18
-#define CORDER_ITER_STOP 3
-#define CORDER_EST_ENTRY_LEN 9
+#define CORDER_NLINKS 18
+#define CORDER_ITER_STOP 3
+#define CORDER_EST_ENTRY_LEN 9
/* Timestamp macros */
#define TIMESTAMP_GROUP_1 "timestamp1"
@@ -328,21 +325,19 @@ static const char *FILENAME[] = {
*
* Purpose: Test building a file with assorted links.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
* Programmer: Binh-Minh Ribler
* October 16, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_basic_links(hid_t fapl_id, hbool_t new_format)
{
- hsize_t size[1] = {1};
- char filename[NAME_BUF_SIZE];
+ hsize_t size[1] = {1};
+ char filename[NAME_BUF_SIZE];
// Use the file access template id to create a file access prop. list.
FileAccPropList fapl(fapl_id);
@@ -443,17 +438,15 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
/*-------------------------------------------------------------------------
* Function: test_num_links
*
- * Purpose Test setting and getting limit of number of links
+ * Purpose: Test setting and getting limit of number of links
*
- * Return Success: 0
+ * Return: Success: 0
*
* Failure: -1
*
- * Programmer Binh-Minh Ribler
+ * Programmer: Binh-Minh Ribler
* Mar, 2017
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_num_links(hid_t fapl_id, hbool_t new_format)
@@ -477,7 +470,7 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format)
size_t nlinks = 5;
lapl.setNumLinks(nlinks);
- // Read it back and verify
+ // Read it back and verify
size_t read_nlinks = lapl.getNumLinks();
verify_val(read_nlinks, nlinks, "LinkAccPropList::setNumLinks", __LINE__, __FILE__);
@@ -504,9 +497,9 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format)
extern "C"
void test_links()
{
- hid_t fapl_id, fapl2_id; /* File access property lists */
- hbool_t new_format; /* Whether to use the new format or not */
- const char *envval;
+ hid_t fapl_id, fapl2_id; // File access property lists
+ hbool_t new_format; // Whether to use the new format or not
+ const char *envval;
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
@@ -687,8 +680,6 @@ void test_links()
* Programmer: Binh-Minh Ribler
* October 16, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
extern "C"