diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-09-21 19:53:17 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-09-21 19:53:17 (GMT) |
commit | 7ef33fa7b306338399ac2160a66f421a5a0feccf (patch) | |
tree | 80ce355811ff1de87625506a92f9b52bf1f162c0 /c++/test/h5cpputil.cpp | |
parent | 052efd9bde06ea2427beffd3ea493cbc53a17608 (diff) | |
download | hdf5-7ef33fa7b306338399ac2160a66f421a5a0feccf.zip hdf5-7ef33fa7b306338399ac2160a66f421a5a0feccf.tar.gz hdf5-7ef33fa7b306338399ac2160a66f421a5a0feccf.tar.bz2 |
Purpose: Fix bug HDFFR-9920 cont.
Description:
Adding user's test revealed a flaw in the fix.
Moved CommonFG's functions in Group to H5Location, so that they
could be called by objects that can be used to specify a location
Also, rearranged many "#include" header files to resolve conflicts.
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/test/h5cpputil.cpp')
-rw-r--r-- | c++/test/h5cpputil.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index 05a4d9a..3bc38b5 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -164,6 +164,32 @@ int check_values (hsize_t i, hsize_t j, int apoint, int acheck) } // check_values /*------------------------------------------------------------------------- + * Function: check_values + * + * Purpose: Checks a char string pointer for NULL. If it is NULL, + * the function will print out a message + * + * Return: Success: 0 + * + * Failure: -1 + * + * Programmer: Binh-Minh Ribler (using C code segment for checking values) + * Friday, September 16, 2016 + * + *------------------------------------------------------------------------- + */ +void check_values(const char *value, const char* msg, int line, const char* file_name) +{ + if (value == NULL) + { + cerr << endl; + cerr << "*** ERROR: " << msg << ", at line " << line << endl; + IncTestNumErrs(); + throw TestFailedException(file_name, msg); + } +} + +/*------------------------------------------------------------------------- * Function: verify_val (const char*, const char*,...) * * Purpose: Compares two character strings. If they are |