diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-12-29 14:26:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-12-29 14:26:20 (GMT) |
commit | 427ff7da2848042f68ecfadf5a321b1d8077e9db (patch) | |
tree | 73024b1954031fbb724c2d96a485590348e5cc22 /c++ | |
parent | 9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff) | |
download | hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2 |
[svn-r9727] Purpose:
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:
Diffstat (limited to 'c++')
-rw-r--r-- | c++/examples/chunks.cpp | 2 | ||||
-rw-r--r-- | c++/examples/extend_ds.cpp | 2 | ||||
-rw-r--r-- | c++/examples/readdata.cpp | 4 | ||||
-rw-r--r-- | c++/examples/writedata.cpp | 6 | ||||
-rw-r--r-- | c++/src/H5Alltypes.h | 2 | ||||
-rw-r--r-- | c++/src/H5CompType.cpp | 18 | ||||
-rw-r--r-- | c++/src/H5CompType.h | 8 | ||||
-rw-r--r-- | c++/src/H5DataSpace.cpp | 6 | ||||
-rw-r--r-- | c++/src/H5DataSpace.h | 6 | ||||
-rw-r--r-- | c++/src/H5DataType.h | 1 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.cpp | 3 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.h | 2 | ||||
-rw-r--r-- | c++/src/H5EnumType.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5EnumType.h | 2 | ||||
-rw-r--r-- | c++/src/H5FcreatProp.h | 17 | ||||
-rw-r--r-- | c++/src/H5Library.cpp | 10 | ||||
-rw-r--r-- | c++/test/dsets.cpp | 3 | ||||
-rw-r--r-- | c++/test/h5cpputil.cpp | 1 | ||||
-rw-r--r-- | c++/test/h5cpputil.h | 2 | ||||
-rw-r--r-- | c++/test/tfile.cpp | 33 | ||||
-rw-r--r-- | c++/test/th5s.cpp | 8 |
21 files changed, 73 insertions, 65 deletions
diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp index 3cc4e20..0efd95d 100644 --- a/c++/examples/chunks.cpp +++ b/c++/examples/chunks.cpp @@ -144,7 +144,7 @@ int main (void) /* * Define the column (hyperslab) to read. */ - hssize_t offset[2] = { 0, 2 }; + hsize_t offset[2] = { 0, 2 }; hsize_t count[2] = { 10, 1 }; int column[10]; // buffer for column to be read diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp index c4409db..9c12304 100644 --- a/c++/examples/extend_ds.cpp +++ b/c++/examples/extend_ds.cpp @@ -95,7 +95,7 @@ int main (void) * Select a hyperslab. */ DataSpace fspace1 = dataset.getSpace (); - hssize_t offset[2]; + hsize_t offset[2]; offset[0] = 0; offset[1] = 0; hsize_t dims1[2] = { 3, 3}; /* data1 dimensions */ diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp index 1797d27..7e5b195 100644 --- a/c++/examples/readdata.cpp +++ b/c++/examples/readdata.cpp @@ -128,7 +128,7 @@ int main (void) * Define hyperslab in the dataset; implicitly giving strike and * block NULL. */ - hssize_t offset[2]; // hyperslab offset in the file + hsize_t offset[2]; // hyperslab offset in the file hsize_t count[2]; // size of the hyperslab in the file offset[0] = 1; offset[1] = 2; @@ -148,7 +148,7 @@ int main (void) /* * Define memory hyperslab. */ - hssize_t offset_out[3]; // hyperslab offset in memory + hsize_t offset_out[3]; // hyperslab offset in memory hsize_t count_out[3]; // size of the hyperslab in memory offset_out[0] = 3; offset_out[1] = 0; diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp index 8e0404c..0bed680 100644 --- a/c++/examples/writedata.cpp +++ b/c++/examples/writedata.cpp @@ -98,7 +98,7 @@ int main (void) * Select hyperslab for the dataset in the file, using 3x2 blocks, * (4,3) stride and (2,4) count starting at the position (0,1). */ - hssize_t start[2]; // Start of hyperslab + hsize_t start[2]; // Start of hyperslab hsize_t stride[2]; // Stride of hyperslab hsize_t count[2]; // Block count hsize_t block[2]; // Block sizes @@ -156,14 +156,14 @@ int main (void) /* * Select sequence of NPOINTS points in the file dataspace. */ - hssize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points + hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points from the file dataspace */ coord[0][0] = 0; coord[0][1] = 0; coord[1][0] = 3; coord[1][1] = 3; coord[2][0] = 3; coord[2][1] = 5; coord[3][0] = 5; coord[3][1] = 6; - fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hssize_t **)coord); + fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord); /* * Write new selection of points to the dataset. diff --git a/c++/src/H5Alltypes.h b/c++/src/H5Alltypes.h index 5cd9d29..17ae0d9 100644 --- a/c++/src/H5Alltypes.h +++ b/c++/src/H5Alltypes.h @@ -24,3 +24,5 @@ #include "H5FloatType.h" #include "H5StrType.h" #include "H5CompType.h" +#include "H5ArrayType.h" +#include "H5VarLenType.h" diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index f95c32f..738506e 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -113,7 +113,7 @@ int CompType::getNmembers() const ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -string CompType::getMemberName( int member_num ) const +string CompType::getMemberName( unsigned member_num ) const { char* member_name_C = H5Tget_member_name( id, member_num ); if( member_name_C == NULL ) // NULL means failure @@ -169,7 +169,7 @@ int CompType::getMemberIndex(const string& name) const // Note that byte offset being returned as 0 doesn't indicate // a failure. (According to Quincey) //-------------------------------------------------------------------------- -size_t CompType::getMemberOffset( int member_num ) const +size_t CompType::getMemberOffset( unsigned member_num ) const { size_t offset = H5Tget_member_offset( id, member_num ); return( offset ); @@ -191,7 +191,7 @@ int CompType::getMemberDims( int member_num, size_t* dims, int* perm ) const ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5T_class_t CompType::getMemberClass( int member_num ) const +H5T_class_t CompType::getMemberClass( unsigned member_num ) const { // get the member datatype first hid_t member_type_id = H5Tget_member_type( id, member_num ); @@ -215,7 +215,7 @@ H5T_class_t CompType::getMemberClass( int member_num ) const // of the specified member. It provides the id to construct appropriate // sub-types in the functions getMemberXxxType below, where Xxx indicates // the sub-types. -hid_t CompType::p_get_member_type(int member_num) const +hid_t CompType::p_get_member_type(unsigned member_num) const { // get the id of the specified member first hid_t member_type_id = H5Tget_member_type( id, member_num ); @@ -325,27 +325,27 @@ StrType CompType::getMemberStrType( int member_num ) const May, 2004: These should be reconsidered to provide more convenience. // Returns the datatype of the specified member in this compound datatype. // Several overloading of getMemberType are for different datatypes -void CompType::getMemberType( int member_num, EnumType& enumtype ) const +void CompType::getMemberType( unsigned member_num, EnumType& enumtype ) const { p_get_member_type(member_num, enumtype); } -void CompType::getMemberType( int member_num, CompType& comptype ) const +void CompType::getMemberType( unsigned member_num, CompType& comptype ) const { p_get_member_type(member_num, comptype); } -void CompType::getMemberType( int member_num, IntType& inttype ) const +void CompType::getMemberType( unsigned member_num, IntType& inttype ) const { p_get_member_type(member_num, inttype); } -void CompType::getMemberType( int member_num, FloatType& floatype ) const +void CompType::getMemberType( unsigned member_num, FloatType& floatype ) const { p_get_member_type(member_num, floatype); } -void CompType::getMemberType( int member_num, StrType& strtype ) const +void CompType::getMemberType( unsigned member_num, StrType& strtype ) const { p_get_member_type(member_num, strtype); } diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 0c530b1..bc96969 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -34,7 +34,7 @@ class H5_DLLCPP CompType : public DataType { // Returns the type class of the specified member of this compound // datatype. It provides to the user a way of knowing what type // to create another datatype of the same class - H5T_class_t getMemberClass( int member_num ) const; + H5T_class_t getMemberClass( unsigned member_num ) const; // Returns the dimensionality of the specified member. int getMemberDims( int member_num, size_t* dims, int* perm ) const; @@ -44,10 +44,10 @@ class H5_DLLCPP CompType : public DataType { int getMemberIndex(const string& name) const; // Returns the offset of a member of this compound datatype. - size_t getMemberOffset( int memb_no ) const; + size_t getMemberOffset( unsigned memb_no ) const; // Returns the name of a member of this compound datatype. - string getMemberName( int member_num ) const; + string getMemberName( unsigned member_num ) const; // Returns the compound datatype of the specified member in // this compound datatype. @@ -97,7 +97,7 @@ class H5_DLLCPP CompType : public DataType { private: // Contains common code that is used by the member functions // getMemberXxxType - hid_t p_get_member_type(int member_num) const; + hid_t p_get_member_type(unsigned member_num) const; }; #ifndef H5_NO_NAMESPACE } diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp index 548e280..f5584a6 100644 --- a/c++/src/H5DataSpace.cpp +++ b/c++/src/H5DataSpace.cpp @@ -417,7 +417,7 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectBounds // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const +void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const { herr_t ret_value = H5Sget_select_bounds( id, start, end ); if( ret_value < 0 ) @@ -443,7 +443,7 @@ void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElements // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const +void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord[ ] ) const { herr_t ret_value; ret_value = H5Sselect_elements( id, op, num_elements, coord ); @@ -523,7 +523,7 @@ bool DataSpace::selectValid () const /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride, const hsize_t *block ) const +void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block ) const { herr_t ret_value; ret_value = H5Sselect_hyperslab( id, op, start, stride, count, block ); diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 01fb40d..1edaabf 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -41,7 +41,7 @@ class H5_DLLCPP DataSpace : public IdComponent { void extentCopy( DataSpace& dest_space ) const; // Gets the bounding box containing the current selection. - void getSelectBounds( hssize_t* start, hssize_t* end ) const; + void getSelectBounds( hsize_t* start, hsize_t* end ) const; // Gets the number of element points in the current selection. hssize_t getSelectElemNpoints() const; @@ -82,10 +82,10 @@ class H5_DLLCPP DataSpace : public IdComponent { // Selects array elements to be included in the selection for // this dataspace. - void selectElements( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const; + void selectElements( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord[ ] ) const; // Selects a hyperslab region to add to the current selected region. - void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const; + void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const; // Resets the selection region to include no elements. void selectNone() const; diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index fe56cb1..b2f7392 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -106,6 +106,7 @@ class H5_DLLCPP DataType : public H5Object { // Default constructor DataType(); + // Destructor: properly terminates access to this datatype. virtual ~DataType(); protected: diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index ae98a79..8379b57 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -357,6 +357,7 @@ H5Z_filter_t DSetCreatPropList::getFilter(int filter_number, unsigned int &flags ///\param name - OUT: Name of the filter ///\param filter_config - OUT: Flags indicating whether filter can encode/decode ///\exception H5::PropListIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], @@ -622,7 +623,7 @@ int DSetCreatPropList::getExternalCount() const /// will not be returned. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const +void DSetCreatPropList::getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const { herr_t ret_value = H5Pget_external( id, idx, name_size, name, &offset, &size ); if( ret_value < 0 ) diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 15a85e3..d1b5fb5 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -42,7 +42,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList { void setChunk( int ndims, const hsize_t* dim ) const; // Returns information about an external file. - void getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const; + void getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const; // Returns the number of external files for a dataset. int getExternalCount() const; diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 2872c22..2f04d1e 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -255,7 +255,7 @@ int EnumType::getNmembers() const ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void EnumType::getMemberValue( int memb_no, void *value ) const +void EnumType::getMemberValue( unsigned memb_no, void *value ) const { // Call C routine H5Tget_member_value to get the datatype member's value hid_t ret_value = H5Tget_member_value( id, memb_no, value ); diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index 4cb6cbd..f88b337 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -41,7 +41,7 @@ class H5_DLLCPP EnumType : public DataType { int getMemberIndex(const string& name) const; // Returns the value of an enumeration datatype member - void getMemberValue( int memb_no, void *value ) const; + void getMemberValue( unsigned memb_no, void *value ) const; // Inserts a new member to this enumeration type. void insert( const char* name, void *value ) const; diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 7a11ede..aa955d5 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -23,6 +23,7 @@ namespace H5 { // class for file access properties class H5_DLLCPP FileCreatPropList : public PropList { public: + // Default file creation property list. static const FileCreatPropList DEFAULT; // Retrieves version information for various parts of a file. @@ -34,27 +35,27 @@ class H5_DLLCPP FileCreatPropList : public PropList { // Gets the size of a user block in this file creation property list. hsize_t getUserblock() const; - // Sets file size-of addresses and sizes. - void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const; - // Retrieves the size-of address and size quantities stored in a // file according to this file creation property list. void getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const; - // Sets the size of parameters used to control the symbol table nodes. - void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const; + // Sets file size-of addresses and sizes. + void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const; // Retrieves the size of the symbol table B-tree 1/2 rank and the // symbol table leaf node 1/2 size. void getSymk( unsigned& int_nodes_k, unsigned& leaf_nodes_k ) const; - // Sets the size of parameter used to control the B-trees for - // indexing chunked datasets. - void setIstorek( unsigned ik ) const; + // Sets the size of parameters used to control the symbol table nodes. + void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const; // Returns the 1/2 rank of an indexed storage B-tree. unsigned getIstorek() const; + // Sets the size of parameter used to control the B-trees for + // indexing chunked datasets. + void setIstorek( unsigned ik ) const; + // Creates a file create property list. FileCreatPropList(); diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index c8af186..ff9a7d1 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -14,7 +14,7 @@ #include <string> -#include "H5CppDoc.h" // included only for Doxygen to generate part of RM +#include "H5CppDoc.h" // included only for Doxygen to generate part of RM #include "H5Include.h" #include "H5Exception.h" #include "H5Library.h" @@ -60,7 +60,7 @@ void H5Library::close() //-------------------------------------------------------------------------- // Function: H5Library::dontAtExit -///\brief Instructs library not to install \c atexit cleanup routine. +///\brief Instructs library not to install \c atexit cleanup routine ///\exception H5::LibraryIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -95,9 +95,9 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel // Function: H5Library::checkVersion ///\brief Verifies that the arguments match the version numbers /// compiled into the library -///\param majnum - OUT: Major version of the library -///\param minnum - OUT: Minor version of the library -///\param relnum - OUT: Release number of the library +///\param majnum - IN: Major version of the library +///\param minnum - IN: Minor version of the library +///\param relnum - IN: Release number of the library ///\exception H5::LibraryIException ///\par Description /// For information about library version, please refer to diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index c158844..33d086d 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -33,7 +33,6 @@ #endif #include "testhdf5.h" -#include "h5test.h" #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE @@ -603,7 +602,7 @@ test_compression(H5File& file) TESTING("compression (partial I/O)"); const hsize_t hs_size[2] = {4, 50}; - const hssize_t hs_offset[2] = {7, 30}; + const hsize_t hs_offset[2] = {7, 30}; for (i = 0; i < hs_size[0]; i++) { for (j = 0; j < hs_size[1]; j++) { points[hs_offset[0]+i][hs_offset[1]+j] = rand (); diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index 020bab0..8bb0d85 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -93,4 +93,3 @@ void issue_fail_msg(const char* where, int line, const char* file_name) } } - diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index d67c459..93ba1b9 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -46,7 +46,7 @@ template <class Type1, class Type2> cerr << "*** UNEXPECTED VALUE from " << where << " should be " << value << ", but is " << x << " at line " << line << " in " << file_name << endl; - H5Eprint (stdout); + H5Eprint (stderr); } } diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 1e859bc..9e3322f 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -118,7 +118,7 @@ test_file_create(void) */ try { file1 = new H5File( FILE1, H5F_ACC_EXCL ); // should throw E - verify_val(file1->getId(), FAIL, "H5File constructor", __LINE__, __FILE__); + verify_val(file1->getId(), FAIL, "H5File constructor", __LINE__, __FILE__); } catch( FileIException E ) {} // do nothing, FAIL expected @@ -131,7 +131,7 @@ test_file_create(void) */ try { H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E - verify_val(file2.getId(), FAIL, "H5File constructor", __LINE__, __FILE__); + verify_val(file2.getId(), FAIL, "H5File constructor", __LINE__, __FILE__); } catch( FileIException E ) {} // do nothing, FAIL expected @@ -141,7 +141,7 @@ test_file_create(void) */ try { H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E - verify_val(file3.getId(), FAIL, "H5File constructor", __LINE__, __FILE__); + verify_val(file3.getId(), FAIL, "H5File constructor", __LINE__, __FILE__); } catch( FileIException E ) {} // do nothing, FAIL expected @@ -149,12 +149,12 @@ test_file_create(void) FileCreatPropList tmpl1 = file1->getCreatePlist(); hsize_t ublock = tmpl1.getUserblock(); - verify_val(ublock, F1_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); + verify_val(ublock, F1_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); size_t parm1, parm2; /*file-creation parameters */ tmpl1.getSizes( parm1, parm2); - verify_val(parm1, F1_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); - verify_val(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); + verify_val(parm1, F1_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); + verify_val(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); unsigned iparm1,iparm2; /*file-creation parameters */ tmpl1.getSymk( iparm1, iparm2); @@ -198,12 +198,12 @@ test_file_create(void) /* Get the file-creation parameters */ hsize_t ublock = tmpl1->getUserblock(); - verify_val(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); + verify_val(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); size_t parm1, parm2; /*file-creation parameters */ tmpl1->getSizes( parm1, parm2); - verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); - verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); + verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); + verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); unsigned iparm1,iparm2; /*file-creation parameters */ tmpl1->getSymk( iparm1, iparm2); @@ -231,15 +231,15 @@ test_file_create(void) /* Get the file-creation parameters */ ublock = tmpl1->getUserblock(); - verify_val(ublock, F3_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); + verify_val(ublock, F3_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); tmpl1->getSizes( parm1, parm2); - verify_val(parm1, F3_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); - verify_val(parm2, F3_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); + verify_val(parm1, F3_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); + verify_val(parm2, F3_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); tmpl1->getSymk( iparm1, iparm2); - verify_val(iparm1, F3_SYM_INTERN_K, "FileCreatPropList::getSymk", __LINE__, __FILE__); - verify_val(iparm2, F3_SYM_LEAF_K, "FileCreatPropList::getSymk", __LINE__, __FILE__); + verify_val(iparm1, F3_SYM_INTERN_K, "FileCreatPropList::getSymk", __LINE__, __FILE__); + verify_val(iparm2, F3_SYM_LEAF_K, "FileCreatPropList::getSymk", __LINE__, __FILE__); /* Dynamically release file-creation template */ delete tmpl1; @@ -394,12 +394,14 @@ test_file_name() // Get file name from the file instance. file_name = file4.getFileName(); + verify_val(file_name, FILE4, "H5File::getFileName", __LINE__, __FILE__); /* Create a group in the root group */ Group group(file4.createGroup(GROUPNAME, 0)); /* Get and verify file name */ file_name = group.getFileName(); + verify_val(file_name, FILE4, "Group::getFileName", __LINE__, __FILE__); /* Create the data space */ hsize_t dims[RANK] = {NX, NY}; @@ -410,12 +412,14 @@ test_file_name() /* Get and verify file name */ file_name = dataset.getFileName(); + verify_val(file_name, FILE4, "DataSet::getFileName", __LINE__, __FILE__); /* Create an attribute for the dataset */ Attribute attr(dataset.createAttribute(ATTRNAME, PredType::NATIVE_INT, space)); /* Get and verify file name */ file_name = attr.getFileName(); + verify_val(file_name, FILE4, "Attribute::getFileName", __LINE__, __FILE__); /* Create a compound datatype */ CompType comp_type (sizeof(s1_t)); @@ -429,6 +433,7 @@ test_file_name() /* Get and verify file name */ comp_type.getFileName(); + verify_val(file_name, FILE4, "CompType::getFileName", __LINE__, __FILE__); } // end of try block catch (Exception E) { issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__); diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index dacd1ef..afa7713 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -27,8 +27,8 @@ #include <iostream> #endif -#include "H5Cpp.h" #include "testhdf5.h" +#include "H5Cpp.h" #include "h5cpputil.h" #ifndef H5_NO_NAMESPACE @@ -159,7 +159,7 @@ test_h5s_basic(void) } // end of first try block catch( DataSpaceIException error ) { - issue_fail_msg(error.getCFuncName(), __LINE__, __FILE__); + issue_fail_msg(error.getCFuncName(), __LINE__, __FILE__); } /* @@ -229,8 +229,8 @@ test_h5s_basic(void) try { sid3.setExtentSimple( SPACE1_RANK, dims1 ); - // but didn't, issue an error message - issue_fail_msg("DataSpace::setExtentSimple", __LINE__, __FILE__); + // but didn't, issue an error message + issue_fail_msg("DataSpace::setExtentSimple", __LINE__, __FILE__); } catch (DataSpaceIException error) {} // do nothing, FAIL expected } /* test_h5s_basic() */ |