summaryrefslogtreecommitdiffstats
path: root/c++/test/th5s.cpp
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-25 03:51:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-25 03:51:41 (GMT)
commit42efc1c2b591e4cd45ec6cb3bdf32044343118d2 (patch)
tree0ab542871c32246199479e8933ff26286aaf629a /c++/test/th5s.cpp
parent3360c3af0c100ac4d3a2fe2865f34661da862ec5 (diff)
downloadhdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.zip
hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.gz
hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.bz2
[svn-r18451] Description:
Bring r18172:18446 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'c++/test/th5s.cpp')
-rw-r--r--c++/test/th5s.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 258e904..e63c9af 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -36,7 +36,6 @@
#endif // H5_NO_STD
#endif
-#include "testhdf5.h" // C test header file
#include "H5Cpp.h" // C++ API header file
#ifndef H5_NO_NAMESPACE
@@ -44,6 +43,7 @@
#endif
#include "h5cpputil.h" // C++ utilility header file
+#include "H5srcdir.h" // srcdir querying header file
const H5std_string TESTFILE("th5s.h5");
const H5std_string DATAFILE("th5s1.h5");
@@ -121,7 +121,7 @@ static void test_h5s_basic()
hsize_t tmax[4];
// Output message about test being performed
- SUBTEST("Testing Dataspace Manipulation");
+ SUBTEST("Dataspace Manipulation");
try {
// Create simple dataspace sid1
@@ -185,13 +185,7 @@ static void test_h5s_basic()
* If this test fails and the H5S_MAX_RANK variable has changed, follow
* the instructions in space_overflow.c for regenating the th5s.h5 file.
*/
- char testfile[512]="";
- char *srcdir = getenv("srcdir");
- if (srcdir && ((strlen(srcdir) + strlen(TESTFILE.c_str()) + 1) < sizeof(testfile))){
- strcpy(testfile, srcdir);
- strcat(testfile, "/");
- }
- strcat(testfile, TESTFILE.c_str());
+ const char *testfile = H5_get_srcdir_filename(TESTFILE.c_str());
// Create file
H5File fid1(testfile, H5F_ACC_RDONLY);
@@ -270,7 +264,7 @@ static void test_h5s_basic()
static void test_h5s_scalar_write()
{
// Output message about test being performed
- SUBTEST("Testing Scalar Dataspace Writing");
+ SUBTEST("Scalar Dataspace Writing");
try {
// Create file
@@ -336,7 +330,7 @@ static void test_h5s_scalar_read()
hsize_t tdims[4]; // Dimension array to test with
// Output message about test being performed
- SUBTEST("Testing Scalar Dataspace Reading");
+ SUBTEST("Scalar Dataspace Reading");
try {
// Create file
@@ -396,7 +390,7 @@ static void test_h5s_scalar_read()
static void test_h5s_null()
{
// Output message about test being performed
- SUBTEST("Testing Null Dataspace Writing");
+ SUBTEST("Null Dataspace Writing");
try {
// Create file
@@ -451,7 +445,7 @@ static void test_h5s_null()
static void test_h5s_compound_scalar_write()
{
// Output message about test being performed
- SUBTEST("Testing Compound Dataspace Writing");
+ SUBTEST("Compound Dataspace Writing");
try {
// Create file
@@ -526,7 +520,7 @@ static void test_h5s_compound_scalar_read()
hsize_t tdims[4]; // Dimension array to test with
// Output message about test being performed
- SUBTEST("Testing Compound Dataspace Reading");
+ SUBTEST("Compound Dataspace Reading");
try {
// Create file
H5File fid1(DATAFILE, H5F_ACC_RDWR);
@@ -594,6 +588,7 @@ extern "C"
void test_h5s()
{
// Output message about test being performed
+ //MESSAGE("Testing Dataspaces\n");
MESSAGE(5, ("Testing Dataspaces\n"));
test_h5s_basic(); // Test basic H5S code