From ee38b91d18e8152662597b6ff605c23cde172e65 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Mon, 9 Jun 2003 23:03:58 -0500 Subject: [svn-r7012] Purpose: Text cleanup Description: Re-worded some informative and error messages. Remove/Updated outdated comments. Platforms: Linux 2.4 (eirene) IRIX 6.5.11 (modi4) --- c++/test/dsets.cpp | 5 +++-- c++/test/h5cpputil.cpp | 12 ++++++------ c++/test/testhdf5.cpp | 23 +++++------------------ c++/test/tfile.cpp | 7 +++---- 4 files changed, 17 insertions(+), 30 deletions(-) diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 450bd1c..b92381a 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -1030,11 +1030,12 @@ main(void) } catch (Exception E) { - return(test_report(nerrors, string(" DATASET TESTS"))); + return(test_report(nerrors, string(" Dataset"))); } /* use C test utility routine to clean up data files */ h5_cleanup(FILENAME, fapl_id); /* print out dsets test results */ - return(test_report(nerrors, string(" DATASET TESTS"))); + cerr << endl << endl; + return(test_report(nerrors, string(" Dataset"))); } diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index df42fd8..85ba2d2 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -37,9 +37,9 @@ using namespace std; /*------------------------------------------------------------------------- * Function: test_report * - * Purpose: Prints out the number of errors for dataset tests if there - * were any failures occurred. If no failure, test_report - * prints out the "All dataset tests passed" message + * Purpose: Prints out the number of errors for the tests indicated + * by 'testname,' if there were any failures occurred. If + * no failure, test_report prints out the tests passed message. * * Return: if any failure has occurred: 1 * @@ -59,15 +59,15 @@ int test_report( int nerrors, const string& testname ) nerrors = MAX(1, nerrors); if (1 == nerrors) cout << "***** " << nerrors << testname - << " FAILED! *****" << endl; + << " TEST FAILED! *****" << endl; else cout << "***** " << nerrors << testname - << " FAILED! *****" << endl; + << " TESTS FAILED! *****" << endl; return 1; } else { - cout << "All dataset tests passed." << endl; + cout << "All" << testname << " tests passed." << endl; return 0; } } diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp index 630a0e4..fbe28a0 100644 --- a/c++/test/testhdf5.cpp +++ b/c++/test/testhdf5.cpp @@ -66,6 +66,8 @@ int Verbosity; using namespace H5; #endif /* !H5_NO_NAMESPACE */ +#include "h5cpputil.h" + struct TestStruct { int NumErrors; char Description[64]; @@ -142,11 +144,6 @@ print_func(const char *format,...) return ret_value; } -void -test_tbbt(void) -{ -} - int main(int argc, char *argv[]) { @@ -173,14 +170,9 @@ main(int argc, char *argv[]) */ Exception::dontPrint(); - // Tests are generally arranged from least to most complexity... - //InitTest("metadata", test_metadata, cleanup_metadata, "Encode/decode metadata code"); - - // C++ API doesn't need this test */ - InitTest("tbbt", test_tbbt, NULL, "Threaded, Balanced, Binary Trees - not tested"); - // testing file creation and opening in tfile.cpp - InitTest("file", test_file, cleanup_file, "Low-Level File I/O"); + InitTest("file", test_file, cleanup_file, "File I/O Operations"); + // testing dataspace functionalities in th5s.cpp InitTest("h5s", test_h5s, cleanup_h5s, "Dataspaces"); /* Comment out tests that are not done yet. - BMR, Feb 2001 @@ -300,12 +292,7 @@ Comment out tests that are not done yet */ } MESSAGE(2, ("\n\n")) - - if (num_errs) - print_func("!!! %d Error(s) were detected !!!\n\n", (int) num_errs); - else - print_func("All tests were successful. \n\n"); - + test_report(num_errs, string(" HDF5 Base")); if (Summary) { print_func("Summary of Test Results:\n"); print_func("Name of Test Errors Description of Test\n"); diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 41c7f0b..82d7338 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -78,7 +78,7 @@ static void test_file_create(void) { /* Output message about test being performed */ - MESSAGE(5, ("Testing Low-Level File Creation I/O\n")); + MESSAGE(5, ("Testing File Creation I/O\n")); /* Test create with various sequences of H5F_ACC_EXCL and */ /* H5F_ACC_TRUNC flags */ @@ -274,7 +274,7 @@ static void test_file_open(void) { /* Output message about test being performed */ - MESSAGE(5, ("Testing Low-Level File Opening I/O\n")); + MESSAGE(5, ("Testing File Opening I/O\n")); try { @@ -282,7 +282,6 @@ test_file_open(void) H5File fid1 (FILE2, H5F_ACC_RDWR ); /* Get the file-creation template */ - //FileCreatPropList tmpl1; FileCreatPropList tmpl1 = fid1.getCreatePlist(); /* Get the file-creation parameters */ @@ -329,7 +328,7 @@ void test_file(void) { /* Output message about test being performed */ - MESSAGE(5, ("Testing Low-Level File I/O\n")); + MESSAGE(5, ("Testing File I/O operations\n")); test_file_create(); /* Test file creation (also creation templates) */ test_file_open(); /* Test file opening */ -- cgit v0.12