summaryrefslogtreecommitdiffstats
path: root/c++/test/h5cpputil.h
Commit message (Collapse)AuthorAgeFilesLines
* Modern C++ dtor declarations (#1830)Sean McBride2024-02-091-2/+2
| | | | | | | | * C++ dtor modernization - Replaced a bunch of empty dtors with `= default` - Removed deprecated `throw()`. In C++11, dtors are `noexcept` by default. *
* Many clang -Wextra-semi-stmt fixes (#2537)Sean McBride2023-06-161-4/+4
| | | | | * Adds semicolons to function-like macros * Adds a do..while(0) loop to some macros * Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
* Update copyright headers (#2184)Larry Knox2022-11-011-1/+0
| | | | | * Updated source file copyright headers to remove "Copyright by the Board of Trustees of the University of Illinois", which is kept in the top-level COPYING file.
* Various warning fixes (#1812)Sean McBride2022-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed -Wreserved-id-macro warnings from header include guards * Removed all __int64 and LL suffix stuff now that C99 is minimum requirement * Rename `H5FD_CTL__` to `H5FD_CTL_` to fix -Wreserved-id-macro warnings Double underscore is reserved in C++ and this public header should be C++ compatible. * Never define __STDC_FORMAT_MACROS anymore Defining it causes a -Wreserved-id-macro. Happily, according to the C++11 standard: "The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++." https://cplusplus.github.io/LWG/issue984 So looks like it's not necessary to define it with reasonably new toolchains. * Fixed some -Wunused-macros warnings, removed dead code * Fixed all -Wdouble-promotion warnings in C++ files * Fixed remaining -Wsuggest-destructor-override warnings * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Various clang tidy warning fixes (#448)Sean McBride2021-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * Fixed clang-tidy bugprone-reserved-identifier warnings * Fixed clang-tidy bugprone-assert-side-effect warnings * Fixed clang-tidy bugprone-copy-constructor-init warning * Fixed clang-tidy readability-redundant-preprocessor warning For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block. Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing. Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS. * Fixed clang-tidy readability-redundant-string-init warnings * Fixed some clang-tidy performance-type-promotion-in-math-fn warnings * Fixed clang-tidy performance-unnecessary-value-param warnings * Reformat source with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
* Fixed many -Wreserved-id-macro warnings by fixing header guard spelling (#361)Sean McBride2021-02-231-2/+2
| | | | | | | | | | | | | | | | * Fixed many -Wreserved-id-macro warnings by fixing header guard spelling Removed leading underscore(s) from header guard spelling. Used 2 regexes: ` _H5(.*)_H` ` __H5(.*)_H` Applied case-insensitively to only .h files. * Modified scripts that generate header files to not use underscore prefix Interestingly, there was already no leading underscore in the trailing comment at the end of the file * Fixed remaining -Wreserved-id-macro warning not caught by regex
* Update license url part2 (#333)Larry Knox2021-02-171-1/+1
| | | | | | * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - files not in src or test.
* Clang-format of source filesAllen Byrne2020-09-301-52/+54
|
* Trim trailing whitespaceQuincey Koziol2020-04-201-1/+1
|
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* Description:Binh-Minh Ribler2017-03-031-35/+35
| | | | | | Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly) - very minor
* Description:Binh-Minh Ribler2016-10-191-5/+0
| | | | | | | | | | | | Removed obsolet macros from C++ API: H5_NO_NAMESPACE, H5_NO_STD, __cplusplus Leave OLD_HEADER_FILENAME because iostream.h might still be in use, until further checking is done. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test) Jelly
* Purpose: Fix bug HDFFR-9920 cont.Binh-Minh Ribler2016-09-211-2/+6
| | | | | | | | | | | | | 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)
* Purpose: Code cleanupBinh-Minh Ribler2016-09-021-1/+14
| | | | | | | | | | Description: - Used FP_EPSILON in comparing float values to verify read data - Casted C macro to fix mismatched types in verify_val calls Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r28905] Purpose: Fix user reported problemBinh-Minh Ribler2016-01-151-0/+2
| | | | | | | | | | | | | | | | Description: User Adam Rosenberger reported a failure when using the member function AbstractDs::getArrayType(). This problem was caused by missing initialization of the ArrayType's members in some cases. Solution: - Added ArrayType::setArrayInfo() to retrieve rank and dimensions of an array and store them in memory for easy access. - Re-factored a few functions to use the new function. - We'll give him 1.8.16 patch Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r24994] Purpose: Removed some warningsBinh-Minh Ribler2014-04-091-0/+13
| | | | | | | | | Description: Turned on warnings and removed some of those. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24969] Description:Binh-Minh Ribler2014-04-061-0/+2
| | | | | | | | | | | | | | - Added wrappers to H5Object for H5Iget_name() to get object's name ssize_t getObjName(char *obj_name, size_t buf_size = 0) const; ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const; H5std_string getObjName() const; - Added tests tobject.cpp - Added to various cleanup_* functions in tests to remove generated files - Added an overload H5I_type_t getHDFObjType() to get object's type Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu) with gmake
* [svn-r24925] Purpose: Fix HDFFV-7907Binh-Minh Ribler2014-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | Description: Added transform property list functions // Constructor creates a dataset transform property list. DSetMemXferPropList(const char* expression); // Sets data transform expression. void setDataTransform(const char* expression) const; void setDataTransform(const H5std_string& expression) const; // Gets data transform expression. ssize_t getDataTransform(char* exp, size_t buf_size=0) const; H5std_string getDataTransform() const; Added test file tdspl.cpp. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r24830] Purpose: HDFFV-8623Binh-Minh Ribler2014-03-181-2/+2
| | | | | | | | | | | | Description: Applied patch from user Jason Newton. JIRA issue HDFFV-8623, patch 9, improve c++ compatibility with exceptions. All additions of "throw()" are included. Exception::what() is not added because it is not necessary. It was suggested for the name, which follows stdlib. Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) Linux/64 2.6 (koala)/PGI compilers
* [svn-r24188] Purpose: Fixed bug introduced in r24163Binh-Minh Ribler2013-09-231-0/+2
| | | | | | | | | | | | | Description: - The failure in daily test was caused by missing initialization of member "id" in a few constructors. This is now fixed. - Added two overloaded H5Location::setComment - Improved some error reporting in H5Location - Improved error reporting in tests Platforms tested: Linux/32 2.6 (jam) SunOS 5.11 (emu) Linux/64 2.6 (koala)/PGI compilers
* [svn-r18685] Description:Binh-Minh Ribler2010-05-021-0/+3
| | | | | | | | | Added missing overloaded function getObjTypeByIdx to return type name as a char*. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) SunOS 5.10 (linew)
* [svn-r18335] Description:Binh-Minh Ribler2010-02-261-1/+3
| | | | | | | | | | Removed header file testhdf5.h from C++ tests to eliminate a non-standard problem on OpenVMS. It wasn't essential. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) Ray agreed to test on OpenVMS.
* [svn-r17690] Purpose: Code improvementBinh-Minh Ribler2009-10-201-17/+19
| | | | | | | | | | | | | | Description: Fixed CommonFG::getComment and CommonFG::getLinkval to provide default values for buffer size to improve usability. Added test file tlinks.cpp, which only contains test for getLinkval and will expand when C++ wrappers for H5L functions are implemented. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) SunOS 5.10 (linew)
* [svn-r13524] Purpose: Cleanup testsBinh-Minh Ribler2007-03-171-7/+23
| | | | | | | | | | | Description: Added extern "C" to cleanup functions as well, forgot last time. Cleaned up/Added comments to some of the newly added tests. Platforms tested AIX 5.1 (copper) Linux 2.6 (kagiso) SunOS 5.8 64-bit (sol)
* [svn-r13474] Purpose: Fixed bugsBinh-Minh Ribler2007-03-081-0/+8
| | | | | | | | | | | | | | | | | Description: VMS revealed a problem in calling C++ test functions from C AddTest. Solution: Per Quincey's suggestion, added #ifdef __cplusplus extern "C" #endif to the called C++ functions. Platforms tested AIX 5.1 (copper) Linux 2.6 (kagiso) On pending: waiting for Elena to test on VMS when she comes back.
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-2/+3
| | | | | | | | | copyright notice. Tested platform: Kagiso only since it is only a comment block change. If it works in one machine, it should work in all, I hope. Still need to check the parallel build on copper.
* [svn-r13210] Purpose: Adding testBinh-Minh Ribler2007-01-291-0/+3
| | | | | | | | | | | | | Description: - Added a brief test for DSetCreatPropList::setSzip. More through tests will be added later. - Moved check_values from dsets.cpp into h5cpputil.cpp for sharing with other tests. Platforms tested AIX 5.1 (copper) SunOS 5.8 64-bit (sol) Linux 2.6 (kagiso)
* [svn-r13201] Purpose: Adding testBinh-Minh Ribler2007-01-261-1/+45
| | | | | | | | | | | | | | | | Description: Added * tests for some generic datatype operations * tests for compound datatype operations These tests are checked in now to make sure they're safe! They can use some more comments and minor cleanups. Will do very soon. Fixed few minor typos. Platforms tested AIX 5.1 (copper) SunOS 5.8 64-bit (sol) HPUX 11.00 (kelgia)
* [svn-r12202] Purpose: MaintenanceBinh-Minh Ribler2006-04-051-2/+2
| | | | | | | | | | | | Description: Changed to alias string instead of std, i.e. H5std_string instead of H5std, because the old way wasn't working when std didn't exist. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) HPUX 11.00 (kelgia) - this was the problematic platform but I wasn't able to test before.
* [svn-r12180] Purpose: MaintenanceBinh-Minh Ribler2006-03-301-3/+2
| | | | | | | | | | | Description: Added alias H5_std so either the global or std namespace can be used, depending on H5_NO_STD. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) AIX 5.1 (copper)
* [svn-r11487] Purpose:Quincey Koziol2005-10-011-12/+12
| | | | | | | | | | | Code cleanup Description: Tweak copyright on C++ source files to reduce whining by copyright checking script. Platforms tested: FreeBSD 4.11 (sleipnir) w/C++
* [svn-r11245] Purpose:Quincey Koziol2005-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r10242] Purpose: Updating C++ testsBinh-Minh Ribler2005-03-201-1/+15
| | | | | | | | | | Description: Added an overloaded function for the template function verify_val. Updated various comments/headers. Platforms tested: Linux 2.4 (heping) AIX 5.1 (copper)
* [svn-r10093] Purpose: Fix bugBinh-Minh Ribler2005-02-261-8/+1
| | | | | | | | | Description: Fixed typo in using namespace; it was mistakenly opening the namespace. Platforms tested: Linux 2.4 (heping) Very minor, and tested 3 platforms for 1.6 branch
* [svn-r9890] Purpose: Clean up testsBinh-Minh Ribler2005-01-311-1/+2
| | | | | | | | | | | | | | | | Description: + C tests' macro VERIFY casts values to 'long' for all cases. Since there are no operator<< for 'long long' or int64 in VS C++ ostream, I casted the hsize_t/hssize_t values passed to verify_val to 'long' as well. If problems arise later, this may have to be specificly handled with an overload - th5s.cpp + Added the use of InvalidActionException for when an action should cause an exception but didn't - th5s.cpp and tfile.cpp + Small changes to improve failure reports Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
* [svn-r9829] Purpose: Clean up testsBinh-Minh Ribler2005-01-161-0/+18
| | | | | | | | | | | | | | | | | | | Description: + replaced "goto error" with throw exceptions + properly cleanup dynamically allocated memory in failure cases, for in some cases, the execution continues on after the failures were reported. + added test utility class InvalidActionException for when an action should cause an exception but doesn't. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene) Note that there was an error due to the missing symbol H5E_LEN. To be able to test my changes, I temporarily replaced H5E_LEN in c++/src with a constant as in the C tests, before the problem can be fixed. This value doesn't effect the C++ tests at all, at this time.
* [svn-r9727] Purpose:Quincey Koziol2004-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
* [svn-r9696] Purpose: Clean up testsBinh-Minh Ribler2004-12-201-0/+21
| | | | | | | | | | | | Description: Replaced cout's with cerr's. Replaced macro VERIFY with template function verify_val to verify read data/info. Cleanup various places in the tests to make them more consistent. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
* [svn-r6997] Binh-Minh Ribler2003-06-091-0/+32
Purpose: Code cleanup Description: Moved a utility function out so other tests can use the same function and avoid code duplication. Future utility functions can also benefit from this move. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene) IRIX 6.5.11 (modi4) HPUX 11.00 (kelgia)