diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-04-25 18:02:28 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-04-25 18:02:28 (GMT) |
commit | 8b90adeac6716fe17fc0f4241bdd48333d15941a (patch) | |
tree | f43f29322bd3007643d813fb61772052027eebfd | |
parent | 91e56dc68db9b37fb536bac555e95953ba240ac2 (diff) | |
download | hdf5-8b90adeac6716fe17fc0f4241bdd48333d15941a.zip hdf5-8b90adeac6716fe17fc0f4241bdd48333d15941a.tar.gz hdf5-8b90adeac6716fe17fc0f4241bdd48333d15941a.tar.bz2 |
[svn-r12296] Purpose: Maintenance
Description:
dsets.cpp: added a missing PASSED call to line up output better.
tattr.cpp: casted parameters to verify_val properly to fix compilation
errors on Windows, introduced from the previous checkin.
Platforms tested:
Linux 2.4 (heping) - very minor
Windows XP
-rw-r--r-- | c++/test/dsets.cpp | 2 | ||||
-rw-r--r-- | c++/test/tattr.cpp | 64 |
2 files changed, 33 insertions, 33 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 0930451..c82dc7f 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -369,7 +369,7 @@ test_tconv( H5File& file) // clean up and return with success delete [] out; delete [] in; - cerr << " PASSED" << endl; + PASSED(); return 0; } // end try diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 5791797..21fe503 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -1024,116 +1024,116 @@ test_attr_dtype_shared(void) H5G_stat_t statbuf; /* Object's information */ h5_stat_size_t filesize; /* Size of file after modifications */ - // Output message about test being performed */ + // Output message about test being performed MESSAGE(5, ("Testing Shared Datatypes with Attributes\n")); try { - // Create a file */ + // Create a file H5File fid1(FILENAME, H5F_ACC_TRUNC); - // Close file */ + // Close file fid1.close(); - // Get size of file */ - h5_stat_size_t empty_filesize; // Size of empty file */ + // Get size of file + h5_stat_size_t empty_filesize; // Size of empty file empty_filesize = h5_get_file_size(FILENAME.c_str()); if (empty_filesize == 0) TestErrPrintf("Line %d: file size wrong!\n",__LINE__); - // Open the file again */ + // Open the file again fid1.openFile(FILENAME, H5F_ACC_RDWR); - // Create a datatype to commit and use */ + // Create a datatype to commit and use IntType dtype(PredType::NATIVE_INT); - // Commit datatype to file */ + // Commit datatype to file dtype.commit(fid1, TYPE1_NAME); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 1, "DataType::getObjinfo", __LINE__, __FILE__); - // Create dataspace for dataset */ + // Create dataspace for dataset DataSpace dspace; - // Create dataset */ + // Create dataset DataSet dset = fid1.createDataSet(DSET1_NAME, dtype, dspace); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 2, "H5File::getObjinfo", __LINE__, __FILE__); - // Create attribute on dataset */ + // Create attribute on dataset Attribute attr = dset.createAttribute(ATTR1_NAME,dtype,dspace); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 3, "DataSet::getObjinfo", __LINE__, __FILE__); - // Close attribute */ + // Close attribute attr.close(); - // Delete attribute */ + // Delete attribute dset.removeAttr(ATTR1_NAME); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 2, "DataSet::getObjinfo after DataSet::removeAttr", __LINE__, __FILE__); - // Create attribute on dataset */ + // Create attribute on dataset attr = dset.createAttribute(ATTR1_NAME,dtype,dspace); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 3, "DataSet::createAttribute", __LINE__, __FILE__); - // Write data into the attribute */ + // Write data into the attribute attr.write(PredType::NATIVE_INT,&data); - // Close attribute, dataset, dataspace, datatype, and file */ + // Close attribute, dataset, dataspace, datatype, and file attr.close(); dset.close(); dspace.close(); dtype.close(); fid1.close(); - // Open the file again */ + // Open the file again fid1.openFile(FILENAME, H5F_ACC_RDWR); - // Open dataset */ + // Open dataset dset = fid1.openDataSet(DSET1_NAME); - // Open attribute */ + // Open attribute attr = dset.openAttribute(ATTR1_NAME); - // Read data from the attribute */ + // Read data from the attribute attr.read(PredType::NATIVE_INT, &rdata); verify_val(data, rdata, "Attribute::read", __LINE__, __FILE__); - // Close attribute and dataset */ + // Close attribute and dataset attr.close(); dset.close(); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 3, "DataSet::openAttribute", __LINE__, __FILE__); - // Unlink the dataset */ + // Unlink the dataset fid1.unlink(DSET1_NAME); - // Check reference count on named datatype */ + // Check reference count on named datatype fid1.getObjinfo(TYPE1_NAME, statbuf); verify_val(statbuf.nlink, 1, "H5File::unlink", __LINE__, __FILE__); - // Unlink the named datatype */ + // Unlink the named datatype fid1.unlink(TYPE1_NAME); // Close file fid1.close(); - // Check size of file */ + // Check size of file filesize=h5_get_file_size(FILENAME.c_str()); - verify_val(filesize, empty_filesize, "~H5File", __LINE__, __FILE__); + verify_val((long)filesize, (long)empty_filesize, "Checking file size", __LINE__, __FILE__); } // end try block catch (Exception E) { |