summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/dsets.cpp3
-rw-r--r--c++/test/h5cpputil.cpp1
-rw-r--r--c++/test/h5cpputil.h2
-rw-r--r--c++/test/tfile.cpp33
-rw-r--r--c++/test/th5s.cpp8
5 files changed, 25 insertions, 22 deletions
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() */