diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-10-11 18:09:08 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-10-11 18:09:08 (GMT) |
commit | f067d70823d760973996ea439c698e6f0e8432d6 (patch) | |
tree | 34beb40901dc4acc230e0ebb8969cf1491285b37 /c++/test/h5cpputil.cpp | |
parent | 36b58147850bda1d5f8429edd53a5f6c15555a1f (diff) | |
parent | c38f4af65bf9f8e3811eeb1fcf2ff2f44457bf3d (diff) | |
download | hdf5-f067d70823d760973996ea439c698e6f0e8432d6.zip hdf5-f067d70823d760973996ea439c698e6f0e8432d6.tar.gz hdf5-f067d70823d760973996ea439c698e6f0e8432d6.tar.bz2 |
Merge pull request #45 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr_cppapi:develop to develop
This should be the final change for HDFFV-9920.
* commit 'c38f4af65bf9f8e3811eeb1fcf2ff2f44457bf3d':
Description: Removed commented out lines. Platform tested Jam (only comments)
Purpose: Fix bug HDFFR-9920 cont. Description: Added new test file titerate.cpp.
Purpose: Updated documentation Description: Revised class brief description and other comments for up-to-date info. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
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.
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 |