summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
commitbdd7d59902483885dd8b883f3b2393e77383e5e8 (patch)
treeaaf20ab132d057b95b3c016d50fc22b77719084b /c++/test
parent8bc0d5ed9019a681e1ea20c24264415d01c1cf2a (diff)
downloadhdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.zip
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.gz
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.bz2
[svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following script: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Tested on: Mac OS X/32 10.5.5 (amazon) No need for h5committest, just whitespace changes...
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/h5cpputil.cpp2
-rw-r--r--c++/test/tattr.cpp2
-rw-r--r--c++/test/tcompound.cpp54
-rw-r--r--c++/test/tfilter.cpp6
-rw-r--r--c++/test/th5s.cpp2
-rw-r--r--c++/test/trefer.cpp10
-rw-r--r--c++/test/ttypes.cpp26
-rw-r--r--c++/test/tvlstr.cpp18
8 files changed, 60 insertions, 60 deletions
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index 4afde22..5e0f904 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -112,7 +112,7 @@ void issue_fail_msg(const char* where, int line, const char* file_name,
* different, the function will print out a message and the
* different values. This function is made to reuse the code
* segment that is used in various places throughout
- * the test code. Where the C version of this code segment
+ * the test code. Where the C version of this code segment
* "goto error," this function will return -1.
*
* Return: Success: 0
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index fe95fe7..11f7303 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1051,7 +1051,7 @@ static void test_attr_dtype_shared()
fid1.openFile(FILENAME, H5F_ACC_RDWR);
// Enclosing to work around the issue of unused variables and/or
- // objects created by copy constructors stay around until end of
+ // objects created by copy constructors stay around until end of
// scope, causing incorrect number of ref counts.
{ // First enclosed block
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index 9532dd6..2b1879b 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -178,13 +178,13 @@ static void test_compound_2()
s_ptr->e != d_ptr->e) {
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
- << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
+ cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
+ << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
+ << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
- cerr << " dst={a=" << s_ptr->a << ", b=" << s_ptr->b
- << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
+ cerr << " dst={a=" << s_ptr->a << ", b=" << s_ptr->b
+ << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
+ << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
}
}
@@ -294,13 +294,13 @@ static void test_compound_3()
s_ptr->e != d_ptr->e) {
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
- << ", c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << "], d="
+ cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
+ << ", c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
+ << s_ptr->c[2] << "," << s_ptr->c[3] << "], d="
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
cerr << " dst={a=" << d_ptr->a
- << ", c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
- << d_ptr->c[2] << "," << d_ptr->c[3] << "], e="
+ << ", c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
+ << d_ptr->c[2] << "," << d_ptr->c[3] << "], e="
<< d_ptr->e << "}" << endl;
} // if
} // for
@@ -391,7 +391,7 @@ static void test_compound_4()
st.insertMember("d", HOFFSET(src_typ_t, d), PredType::NATIVE_INT);
st.insertMember("e", HOFFSET(src_typ_t, e), PredType::NATIVE_INT);
array_dt->close();
-
+
array_dt = new ArrayType(PredType::NATIVE_INT, 1, &four);
// Create an empty compound datatype
@@ -402,7 +402,7 @@ static void test_compound_4()
dt.insertMember("d", HOFFSET(dst_typ_t, d), PredType::NATIVE_SHORT);
dt.insertMember("e", HOFFSET(dst_typ_t, e), PredType::NATIVE_INT);
array_dt->close();
-
+
/* Perform the conversion */
st.convert(dt, (size_t)nelmts, buf, bkg);
@@ -421,17 +421,17 @@ static void test_compound_4()
{
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
- << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
- << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
+ cerr << " src={a=" << s_ptr->a << ", b=" << s_ptr->b
+ << "c=[" << s_ptr->c[0] << "," << s_ptr->c[1] << ","
+ << s_ptr->c[2] << "," << s_ptr->c[3] << ", d="
<< s_ptr->d << ", e=" << s_ptr->e << "}" << endl;
- cerr << " dst={a=" << d_ptr->a << ", b=" << d_ptr->b
- << "c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
- << d_ptr->c[2] << "," << d_ptr->c[3] << ", d="
+ cerr << " dst={a=" << d_ptr->a << ", b=" << d_ptr->b
+ << "c=[" << d_ptr->c[0] << "," << d_ptr->c[1] << ","
+ << d_ptr->c[2] << "," << d_ptr->c[3] << ", d="
<< d_ptr->d << ", e=" << d_ptr->e << "}" << endl;
} // if
} // for
-
+
/* Release resources */
free(buf);
free(bkg);
@@ -493,13 +493,13 @@ static void test_compound_5()
try {
/* Build datatypes */
- ArrayType* array_dt = new ArrayType(PredType::NATIVE_SHORT, 1, dims);
+ ArrayType* array_dt = new ArrayType(PredType::NATIVE_SHORT, 1, dims);
CompType short_array(4*sizeof(short));
short_array.insertMember("_", 0, *array_dt);
array_dt->close();
CompType int_array(4*sizeof(int));
- array_dt = new ArrayType(PredType::NATIVE_INT, 1, dims);
+ array_dt = new ArrayType(PredType::NATIVE_INT, 1, dims);
int_array.insertMember("_", 0, *array_dt);
array_dt->close();
@@ -532,7 +532,7 @@ static void test_compound_5()
src[1].coll_ids[0]!=dst[1].coll_ids[0] ||
src[1].coll_ids[1]!=dst[1].coll_ids[1] ||
src[1].coll_ids[2]!=dst[1].coll_ids[2] ||
- src[1].coll_ids[3]!=dst[1].coll_ids[3])
+ src[1].coll_ids[3]!=dst[1].coll_ids[3])
{ H5_FAILED(); }
/* Free memory buffers */
@@ -614,17 +614,17 @@ static void test_compound_6()
s_ptr = ((src_typ_t*)orig) + i;
d_ptr = ((dst_typ_t*)buf) + i;
if (s_ptr->b != d_ptr->b ||
- s_ptr->d != d_ptr->d)
+ s_ptr->d != d_ptr->d)
{
H5_FAILED();
cerr << " i=" << i << endl;
- cerr << " src={b=" << s_ptr->b << ", d=" << s_ptr->d
+ cerr << " src={b=" << s_ptr->b << ", d=" << s_ptr->d
<< "}" << endl;
- cerr << " dst={b=" << d_ptr->b << ", d=" << d_ptr->d
+ cerr << " dst={b=" << d_ptr->b << ", d=" << d_ptr->d
<< "}" << endl;
} // if
} // for
-
+
/* Release resources */
free(buf);
free(bkg);
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index db7e358..2f87feb 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -48,7 +48,7 @@
#define FILTER_CHUNK_DIM2 25
// will do this function later or use it as guideline - BMR - 2007/01/26
-static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
+static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
int if_fletcher32, int corrupted, hsize_t *dset_size)
{
cerr << "do nothing right now" << endl;
@@ -58,7 +58,7 @@ static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl,
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS 305
static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class_t H5Z_BOGUS[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
@@ -227,7 +227,7 @@ void test_szip_filter(H5File& file1)
{
issue_fail_msg("test_szip_filter()", __LINE__, __FILE__, E.getCDetailMsg());
}
- } // if szip presents
+ } // if szip presents
else {
SKIPPED();
}
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 5a7c678..258e904 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -300,7 +300,7 @@ static void test_h5s_scalar_write()
verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__);
// Create and write a dataset
- DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
+ DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
dataset.write(&space3_data, PredType::NATIVE_UINT);
PASSED();
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 9650a0e..0d9ea4f 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -190,7 +190,7 @@ static void test_reference_obj()
sid1.close();
dataset.close();
delete file1;
-
+
// Re-open the file
file1 = new H5File(FILE1, H5F_ACC_RDWR);
@@ -198,9 +198,9 @@ static void test_reference_obj()
dataset = file1->openDataSet("/Dataset3");
// Read selection from disk
- dataset.read(rbuf, PredType::STD_REF_OBJ);
+ dataset.read(rbuf, PredType::STD_REF_OBJ);
- // Dereference dataset object by ctor, from the location where
+ // Dereference dataset object by ctor, from the location where
// 'dataset' is located
DataSet dset2(dataset, &rbuf[0]);
@@ -234,14 +234,14 @@ static void test_reference_obj()
verify_val(read_comment2, write_comment, "Group::getComment", __LINE__, __FILE__);
group.close();
- // Dereference group object by ctor and using dataset to specify
+ // Dereference group object by ctor and using dataset to specify
// location
Group new_group(dataset, &rbuf[2]);
H5std_string read_comment3 = new_group.getComment(".", 10);
verify_val(read_comment3, write_comment, "Group::getComment", __LINE__, __FILE__);
group.close();
- // Dereference datatype object from the location where 'dataset'
+ // Dereference datatype object from the location where 'dataset'
// is located
dtype1.dereference(dataset, &rbuf[3]);
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index c9f70e7..e9c1615 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -121,7 +121,7 @@ static void test_classes()
}
PASSED();
} // end of try block
- catch (Exception E) {
+ catch (Exception E) {
issue_fail_msg("test_classes", __LINE__, __FILE__, E.getCDetailMsg());
}
}
@@ -176,8 +176,8 @@ static void test_copy()
another_int_type = new_int_type;
PASSED();
- }
- catch (Exception E) {
+ }
+ catch (Exception E) {
issue_fail_msg("test_copy", __LINE__, __FILE__, E.getCDetailMsg());
}
}
@@ -189,12 +189,12 @@ static void test_copy()
* Purpose: Tests query functions of compound and enumeration types.
*
* Return: Success: 0
- *
+ *
* Failure: number of errors
*
* Programmer: Binh-Minh Ribler (use C version)
* January, 2007
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
@@ -286,7 +286,7 @@ static void test_query()
issue_fail_msg("test_query", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_query
-
+
/*-------------------------------------------------------------------------
* Function: test_transient
@@ -308,7 +308,7 @@ const char* filename1 = "dtypes1.h5";
static void test_transient ()
{
static hsize_t ds_size[2] = {10, 20};
-
+
SUBTEST("Transient datatypes");
try {
@@ -342,7 +342,7 @@ static void test_transient ()
} catch (DataTypeIException err) {}
itype.close();
- // Get a copy of the dataset's datatype by applying DataType::copy()
+ // Get a copy of the dataset's datatype by applying DataType::copy()
// to the dataset. The resulted datatype should be modifiable.
itype.copy(dset);
itype.setPrecision(256);
@@ -388,7 +388,7 @@ static void test_named ()
static hsize_t ds_size[2] = {10, 20};
hsize_t i;
unsigned attr_data[10][20];
-
+
SUBTEST("Named datatypes");
try {
// Create the file.
@@ -432,7 +432,7 @@ static void test_named ()
// It should be possible to define an attribute for the named type
Attribute attr1 = itype.createAttribute("attr1", PredType::NATIVE_UCHAR, space);
- for (i=0; i<ds_size[0]*ds_size[1]; i++)
+ for (i=0; i<ds_size[0]*ds_size[1]; i++)
attr_data[0][i] = (int)i;/*tricky*/
attr1.write(PredType::NATIVE_UINT, attr_data);
attr1.close();
@@ -449,7 +449,7 @@ static void test_named ()
/*
* Close the committed type and reopen it. It should return a named type.
* This had something to do with the way IntType was returned and assigned
-and caused itype.committed not working correctly. So, use another_type for
+and caused itype.committed not working correctly. So, use another_type for
now.
itype.close();
itype = file.openIntType("native-int");
@@ -470,7 +470,7 @@ now.
dset.close();
ds_type->close();
- // Reopen the dataset and its type, then make sure the type is
+ // Reopen the dataset and its type, then make sure the type is
// a named type.
dset = file.openDataSet("dset1");
ds_type = new DataType(dset.getDataType());
@@ -492,7 +492,7 @@ now.
if (!iscommitted)
throw InvalidActionException("DataType::iscommitted()", "Dataset type should be named type!");
ds_type->close();
-
+
// Get the dataset datatype by applying DataType::copy() to the
// dataset. The resulted datatype should be modifiable.
IntType copied_type;
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 71b16a6..2c22903 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -76,7 +76,7 @@ void *test_vlstr_alloc_custom(size_t size, void *info)
* This weird contortion is required on the DEC Alpha to keep the
* alignment correct - QAK
*/
-
+
extra = MAX(sizeof(void *),sizeof(size_t));
if((ret_value = HDmalloc(extra + size)) != NULL) {
@@ -108,7 +108,7 @@ void test_vlstr_free_custom(void *_mem, void *info)
* This weird contortion is required on the DEC Alpha to keep the
* alignment correct - QAK
*/
-
+
extra=MAX(sizeof(void *),sizeof(size_t));
if(_mem!=NULL) {
@@ -172,7 +172,7 @@ static void test_vlstrings_basic()
dataset2.close();
HDfree(wdata2);
- // Change to the custom memory allocation routines for reading
+ // Change to the custom memory allocation routines for reading
// VL string.
DSetMemXferPropList xfer;
size_t mem_used = 0; // Memory used during allocation
@@ -239,7 +239,7 @@ static void test_vlstrings_basic()
/*-------------------------------------------------------------------------
* Function: test_vlstrings_special
*
- * Purpose: Test VL string code for special string cases, nil and
+ * Purpose: Test VL string code for special string cases, nil and
* zero-sized.
*
* Return: None
@@ -305,11 +305,11 @@ static void test_vlstrings_special()
// Close Dataset.
dataset.close();
- /*
+ /*
* Create another dataset to test nil strings.
*/
- // Create the property list and set the fill value for the second
+ // Create the property list and set the fill value for the second
// dataset.
DSetCreatPropList dcpl;
char *fill = NULL; // Fill value
@@ -594,7 +594,7 @@ static void test_write_vl_string_attribute()
// Open attribute ATTRSTR_NAME again.
gr_attr = root.openAttribute(ATTRSTR_NAME);
- // The attribute string written is freed below, in the
+ // The attribute string written is freed below, in the
// test_read_vl_string_attribute() test
// Close attribute and file
@@ -671,7 +671,7 @@ static void test_read_vl_string_attribute()
} // test_read_vl_string_attribute
/* Helper routine for test_vl_rewrite() */
-static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
+static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
char *name, char *data)
{
DataSet dset;
@@ -689,7 +689,7 @@ static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
}
/* Helper routine for test_vl_rewrite() */
-static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
+static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
char *name, char *data)
{
char *data_read;