diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-13 15:44:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-13 15:44:56 (GMT) |
commit | 579284f422b6ed25b7a5f4a518c19740fff297c8 (patch) | |
tree | 564b2a7b4c13854a19ffaf465f94e6abd52d6340 /c++/test/tattr.cpp | |
parent | 15d118faedd8e61e8ec2a715cf8fcea5b1afab35 (diff) | |
download | hdf5-579284f422b6ed25b7a5f4a518c19740fff297c8.zip hdf5-579284f422b6ed25b7a5f4a518c19740fff297c8.tar.gz hdf5-579284f422b6ed25b7a5f4a518c19740fff297c8.tar.bz2 |
[svn-r14144] Description:
Move H5Gget_objinfo() to deprecated symbols section and retarget
internal usage to H5Lget_info()/H5Oget_info().
Misc. other code cleanups...
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
AIX/32 5.3 (copper)
Solaris/32 2.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r-- | c++/test/tattr.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index ca0516a..0d545d7 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -1026,7 +1026,9 @@ static void test_attr_dtype_shared() { int data=8; /* Data to write */ int rdata=0; /* Read read in */ +#ifndef H5_NO_DEPRECATED_SYMBOLS H5G_stat_t statbuf; /* Object's information */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ h5_stat_size_t filesize; /* Size of file after modifications */ // Output message about test being performed @@ -1054,9 +1056,11 @@ static void test_attr_dtype_shared() // Commit datatype to file dtype.commit(fid1, TYPE1_NAME); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Create dataspace for dataset DataSpace dspace; @@ -1070,16 +1074,20 @@ static void test_attr_dtype_shared() // Create dataset DataSet dset = fid1.createDataSet(DSET1_NAME, dtype, dspace); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Create attribute on dataset Attribute attr = dset.createAttribute(ATTR1_NAME,dtype,dspace); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Close attribute attr.close(); @@ -1087,16 +1095,20 @@ static void test_attr_dtype_shared() // Delete attribute dset.removeAttr(ATTR1_NAME); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Create attribute on dataset attr = dset.createAttribute(ATTR1_NAME,dtype,dspace); +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Write data into the attribute attr.write(PredType::NATIVE_INT,&data); @@ -1125,18 +1137,22 @@ static void test_attr_dtype_shared() delete attr2; delete dset2; +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Unlink the dataset fid1.unlink(DSET1_NAME); } // end of enclosing to test reference counts +#ifndef H5_NO_DEPRECATED_SYMBOLS // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val((int)statbuf.nlink, 1, "H5File::unlink", __LINE__, __FILE__); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Unlink the named datatype fid1.unlink(TYPE1_NAME); |