diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-04-06 10:55:35 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-04-06 10:55:35 (GMT) |
commit | 6ad638308e2c8b017d3d6b31a5f22ba4c0e692f5 (patch) | |
tree | 955157a6a68260dfbb91c7b005eae479e287a7bf /c++/test | |
parent | 35a3b2e1354fdc7e2be6ab7e36fbca38b3c093f0 (diff) | |
download | hdf5-6ad638308e2c8b017d3d6b31a5f22ba4c0e692f5.zip hdf5-6ad638308e2c8b017d3d6b31a5f22ba4c0e692f5.tar.gz hdf5-6ad638308e2c8b017d3d6b31a5f22ba4c0e692f5.tar.bz2 |
[svn-r12203] Purpose: Maintenance
Description:
Added alias H5std_string to be either ::string or std::string.
Platforms tested:
Linux 2.4 (heping)
SunOS 5.8 64-bit (sol)
HPUX 11.00 (kelgia)
Diffstat (limited to 'c++/test')
-rw-r--r-- | c++/test/dsets.cpp | 19 | ||||
-rw-r--r-- | c++/test/h5cpputil.cpp | 5 | ||||
-rw-r--r-- | c++/test/h5cpputil.h | 6 | ||||
-rw-r--r-- | c++/test/testhdf5.cpp | 1 | ||||
-rw-r--r-- | c++/test/tfile.cpp | 19 | ||||
-rw-r--r-- | c++/test/th5s.cpp | 21 |
6 files changed, 33 insertions, 38 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index d7b3a32..7cb0587 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -33,7 +33,6 @@ #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD - using std::string; using std::cerr; using std::endl; #endif // H5_NO_STD @@ -48,13 +47,13 @@ using namespace H5; #include "h5cpputil.h" // C++ utilility header file -const string FILE1("dataset.h5"); -const string DSET_DEFAULT_NAME("default"); -const string DSET_CHUNKED_NAME("chunked"); -const string DSET_SIMPLE_IO_NAME("simple_io"); -const string DSET_TCONV_NAME ("tconv"); -const string DSET_COMPRESS_NAME("compressed"); -const string DSET_BOGUS_NAME ("bogus"); +const H5std_string FILE1("dataset.h5"); +const H5std_string DSET_DEFAULT_NAME("default"); +const H5std_string DSET_CHUNKED_NAME("chunked"); +const H5std_string DSET_SIMPLE_IO_NAME("simple_io"); +const H5std_string DSET_TCONV_NAME ("tconv"); +const H5std_string DSET_COMPRESS_NAME("compressed"); +const H5std_string DSET_BOGUS_NAME ("bogus"); const int H5Z_FILTER_BOGUS = 305; @@ -1044,7 +1043,7 @@ main(void) } catch (Exception E) { - return(test_report(nerrors, string(" Dataset"))); + return(test_report(nerrors, H5std_string(" Dataset"))); } // Clean up data file @@ -1052,7 +1051,7 @@ main(void) // Print out dsets test results cerr << endl << endl; - return(test_report(nerrors, string(" Dataset"))); + return(test_report(nerrors, H5std_string(" Dataset"))); } // main /*------------------------------------------------------------------------- diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index 0542d13..3ca0d5c 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -29,7 +29,6 @@ #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD - using std::string; using std::cerr; using std::endl; #endif // H5_NO_STD @@ -62,7 +61,7 @@ using namespace H5; * *------------------------------------------------------------------------- */ -int test_report( int nerrors, const string& testname ) +int test_report( int nerrors, const H5std_string& testname ) { if (nerrors) { @@ -119,7 +118,7 @@ InvalidActionException::InvalidActionException():Exception(){} // func_name - IN: Name of the function where failure should occur // message - IN: Message //-------------------------------------------------------------------------- -InvalidActionException::InvalidActionException(const string func_name, const string message) : Exception(func_name, message) {} +InvalidActionException::InvalidActionException(const H5std_string func_name, const H5std_string message) : Exception(func_name, message) {} //-------------------------------------------------------------------------- // Function: InvalidActionException destructor diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index b6601db..7d029e5 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -30,11 +30,11 @@ using namespace H5; #endif #ifndef H5_NO_STD -int test_report (int, const std::string&); +int test_report (int, const H5std_string&); using std::cerr; using std::endl; #else -int test_report (int, const string&); +int test_report (int, const H5std_string&); #endif void issue_fail_msg(const char* where, int line, const char* file_name, @@ -71,7 +71,7 @@ template <class Type1, class Type2> class InvalidActionException : public Exception { public: - InvalidActionException(const string func_name, const string message = DEFAULT_MSG); + InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG); InvalidActionException(); virtual ~InvalidActionException(); }; diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp index 3c660ea..921e421 100644 --- a/c++/test/testhdf5.cpp +++ b/c++/test/testhdf5.cpp @@ -51,7 +51,6 @@ #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD - using std::string; using std::cerr; using std::endl; #endif // H5_NO_STD diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 6e11feb..e5325e7 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -31,7 +31,6 @@ #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD - using std::string; using std::cerr; using std::endl; #endif // H5_NO_STD @@ -56,7 +55,7 @@ const int F1_SYM_INTERN_K = 16; const unsigned F1_SYM_LEAF_K = 4; const unsigned F1_SYM_INTERN_K = 16; #endif /* H5_WANT_H5_V1_4_COMPAT */ -const string FILE1("tfile1.h5"); +const H5std_string FILE1("tfile1.h5"); const hsize_t F2_USERBLOCK_SIZE = (hsize_t)512; const size_t F2_OFFSET_SIZE = 8; @@ -68,7 +67,7 @@ const int F2_SYM_INTERN_K = 32; const unsigned F2_SYM_LEAF_K = 4; const unsigned F2_SYM_INTERN_K = 32; #endif /* H5_WANT_H5_V1_4_COMPAT */ -const string FILE2("tfile2.h5"); +const H5std_string FILE2("tfile2.h5"); const hsize_t F3_USERBLOCK_SIZE = (hsize_t)0; const size_t F3_OFFSET_SIZE = F2_OFFSET_SIZE; @@ -80,10 +79,10 @@ const int F3_SYM_INTERN_K = F2_SYM_INTERN_K; const unsigned F3_SYM_LEAF_K = F2_SYM_LEAF_K; const unsigned F3_SYM_INTERN_K = F2_SYM_INTERN_K; #endif /* H5_WANT_H5_V1_4_COMPAT */ -const string FILE3("tfile3.h5"); +const H5std_string FILE3("tfile3.h5"); const int KB = 1024; -const string FILE4("tfile4.h5"); +const H5std_string FILE4("tfile4.h5"); /*------------------------------------------------------------------------- @@ -433,10 +432,10 @@ test_file_size(void) const int RANK = 2; const int NX = 4; const int NY = 5; -const string GROUPNAME ("group"); -const string DSETNAME ("dataset"); -const string ATTRNAME ("attribute"); -const string DTYPENAME ("compound"); +const H5std_string GROUPNAME ("group"); +const H5std_string DSETNAME ("dataset"); +const H5std_string ATTRNAME ("attribute"); +const H5std_string DTYPENAME ("compound"); // Compound datatype typedef struct s1_t { @@ -450,7 +449,7 @@ test_file_name() // Output message about test being performed MESSAGE(5, ("Testing File Name\n")); - string file_name; + H5std_string file_name; try { // Create a file using default properties. H5File file4(FILE4, H5F_ACC_TRUNC); diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index db7f8c3..f3d55ce1 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -30,7 +30,6 @@ #ifndef H5_NO_NAMESPACE #ifndef H5_NO_STD - using std::string; using std::cerr; using std::endl; #endif // H5_NO_STD @@ -45,18 +44,18 @@ using namespace H5; #include "h5cpputil.h" // C++ utilility header file -const string TESTFILE("th5s.h5"); -const string DATAFILE("th5s1.h5"); +const H5std_string TESTFILE("th5s.h5"); +const H5std_string DATAFILE("th5s1.h5"); /* 3-D dataset with fixed dimensions */ -const string SPACE1_NAME("Space1"); +const H5std_string SPACE1_NAME("Space1"); const int SPACE1_RANK = 3; const int SPACE1_DIM1 = 3; const int SPACE1_DIM2 = 15; const int SPACE1_DIM3 = 13; /* 4-D dataset with one unlimited dimension */ -const string SPACE2_NAME("Space2"); +const H5std_string SPACE2_NAME("Space2"); const int SPACE2_RANK = 4; const int SPACE2_DIM1 = 0; const int SPACE2_DIM2 = 15; @@ -68,17 +67,17 @@ const hsize_t SPACE2_MAX3 = 13; const hsize_t SPACE2_MAX4 = 23; /* Scalar dataset with simple datatype */ -const string SPACE3_NAME("Scalar1"); +const H5std_string SPACE3_NAME("Scalar1"); const int SPACE3_RANK = 0; unsigned space3_data=65; /* Scalar dataset with compound datatype */ -const string SPACE4_NAME("Scalar2"); +const H5std_string SPACE4_NAME("Scalar2"); const int SPACE4_RANK = 0; -const string SPACE4_FIELDNAME1("c1"); -const string SPACE4_FIELDNAME2("u"); -const string SPACE4_FIELDNAME3("f"); -const string SPACE4_FIELDNAME4("c2"); +const H5std_string SPACE4_FIELDNAME1("c1"); +const H5std_string SPACE4_FIELDNAME2("u"); +const H5std_string SPACE4_FIELDNAME3("f"); +const H5std_string SPACE4_FIELDNAME4("c2"); size_t space4_field1_off=0; size_t space4_field2_off=0; size_t space4_field3_off=0; |