2
0
mirror of https://github.com/HDFGroup/hdf5.git synced 2025-04-12 17:31:09 +08:00

[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)
This commit is contained in:
Binh-Minh Ribler 2003-06-09 23:03:58 -05:00
parent 989fba31d4
commit ee38b91d18
4 changed files with 17 additions and 30 deletions

@ -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")));
}

@ -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;
}
}

@ -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");

@ -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 */