summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2006-12-12 14:25:42 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2006-12-12 14:25:42 (GMT)
commit45f11bf42ef06be5db7fa26441b298fa74530a4b (patch)
tree515f473e02ae9217c3167df1480c32108fc3ecab /c++/test
parent9c167bcfa76e4f8a7116a5b061546dfbb5dd27fe (diff)
downloadhdf5-45f11bf42ef06be5db7fa26441b298fa74530a4b.zip
hdf5-45f11bf42ef06be5db7fa26441b298fa74530a4b.tar.gz
hdf5-45f11bf42ef06be5db7fa26441b298fa74530a4b.tar.bz2
[svn-r13050] Purpose: Code cleanup
Description: Fixed several mismatched types causing daily test to fail on tg-login. Platforms tested: Linux 2.6 (kagiso) - just to make sure no ill effects. I cannot login to tg-login3 so am going to watch for it on daily test tonight.
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/tattr.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 76ddfae..bd595fa 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -76,16 +76,16 @@ const int ATTR2_DIM2 = 2;
int attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data for 2nd attribute */
const H5std_string ATTR3_NAME("Attr3");
-const int ATTR3_RANK = 3;
-const int ATTR3_DIM1 = 2;
-const int ATTR3_DIM2 = 2;
-const int ATTR3_DIM3 = 2;
+const hsize_t ATTR3_RANK = 3;
+const hsize_t ATTR3_DIM1 = 2;
+const hsize_t ATTR3_DIM2 = 2;
+const hsize_t ATTR3_DIM3 = 2;
double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{2.3,-26.1},{0.123,-10.0}},{{981724.2,-0.91827},{2.0,23.0}}}; /* Test data for 3rd attribute */
const H5std_string ATTR4_NAME("Attr4");
-const int ATTR4_RANK = 2;
-const int ATTR4_DIM1 = 2;
-const int ATTR4_DIM2 = 2;
+const hsize_t ATTR4_RANK = 2;
+const hsize_t ATTR4_DIM1 = 2;
+const hsize_t ATTR4_DIM2 = 2;
const H5std_string ATTR4_FIELDNAME1("i");
const H5std_string ATTR4_FIELDNAME2("d");
@@ -1051,7 +1051,7 @@ test_attr_dtype_shared(void)
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__);
// Create dataspace for dataset
DataSpace dspace;
@@ -1061,14 +1061,14 @@ test_attr_dtype_shared(void)
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__);
// Create attribute on dataset
Attribute attr = dset.createAttribute(ATTR1_NAME,dtype,dspace);
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__);
// Close attribute
attr.close();
@@ -1078,14 +1078,14 @@ test_attr_dtype_shared(void)
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__);
// Create attribute on dataset
attr = dset.createAttribute(ATTR1_NAME,dtype,dspace);
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__);
// Write data into the attribute
attr.write(PredType::NATIVE_INT,&data);
@@ -1116,14 +1116,14 @@ test_attr_dtype_shared(void)
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__);
// Unlink the dataset
fid1.unlink(DSET1_NAME);
// Check reference count on named datatype
fid1.getObjinfo(TYPE1_NAME, statbuf);
- verify_val(statbuf.nlink, 1, "H5File::unlink", __LINE__, __FILE__);
+ verify_val((int)statbuf.nlink, 1, "H5File::unlink", __LINE__, __FILE__);
// Unlink the named datatype
fid1.unlink(TYPE1_NAME);
@@ -1186,7 +1186,7 @@ test_string_attr(void)
H5std_string read_str;
gr_attr.read(type, read_str);
if (read_str != ATTRSTR_DATA)
- TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n",__LINE__, ATTRSTR_DATA, read_str);
+ TestErrPrintf("Line %d: Attribute data different: ATTRSTR_DATA=%s,read_str=%s\n",__LINE__, ATTRSTR_DATA.c_str(), read_str.c_str());
} // end try block
catch (Exception E) {