summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2004-08-19 06:34:59 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2004-08-19 06:34:59 (GMT)
commit19cb3b5ae784c804efbc9a730bebb710845e4602 (patch)
tree02951364f326db62aa92e07ffd7285febd6ecbad /c++/test
parentd3e91f26898ea8de856bb82e8d9643dccae0d138 (diff)
downloadhdf5-19cb3b5ae784c804efbc9a730bebb710845e4602.zip
hdf5-19cb3b5ae784c804efbc9a730bebb710845e4602.tar.gz
hdf5-19cb3b5ae784c804efbc9a730bebb710845e4602.tar.bz2
[svn-r9116] Purpose:
feature Description: Another revamp of the test interface. TestInit: is used to register Test Program name, test program specific Usage and option parsing routines. TestUsage: will invoke extra usage routine if provided. TestParseCmdLine: will invoke extra option parsing routine if provided. GetTestSummary() and GetTestCleanup() replaces the previous Summary and CleanUp arguments of TestParseCmdLine. test/testhdf5, test/ttsafe.c, testpar/t_mpi.c, testpar/testphdf5.c: All have been updated to use the new Test Routines. testpar/t_mpi.c: Also a fix of a compiler optimization bug when pgcc in Linux is used to compile it. Changed buf[] and expected to unsigned char type to avoid a bug that failed to do sign-extension. Platforms tested: "h5committested" Also tested thread-safe option in eirene.
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/testhdf5.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp
index df97485..b93689b 100644
--- a/c++/test/testhdf5.cpp
+++ b/c++/test/testhdf5.cpp
@@ -47,11 +47,8 @@ using namespace H5;
int
main(int argc, char *argv[])
{
- int Summary = 0;
- int CleanUp = 1;
-
/* Initialize testing framework */
- TestInit();
+ TestInit(argv[0], NULL, NULL);
// testing file creation and opening in tfile.cpp
AddTest("file", test_file, cleanup_file, "File I/O Operations", NULL);
@@ -74,17 +71,17 @@ Comment out tests that are not done yet */
TestInfo(argv[0]);
/* Parse command line arguments */
- TestParseCmdLine(argc,argv,&Summary,&CleanUp,NULL);
+ TestParseCmdLine(argc,argv);
/* Perform requested testing */
PerformTests();
/* Display test summary, if requested */
- if (Summary)
+ if (GetTestSummary())
TestSummary();
/* Clean up test files, if allowed */
- if (CleanUp && !getenv("HDF5_NOCLEANUP"))
+ if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
TestCleanup();
return (GetTestNumErrs());