2003-04-01 01:59:04 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
|
|
|
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
1997-07-31 05:17:56 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
FILE
|
1998-01-17 06:23:43 +08:00
|
|
|
testhdf5.c - HDF5 testing framework main file.
|
1997-07-31 05:17:56 +08:00
|
|
|
|
|
|
|
REMARKS
|
1998-01-17 06:23:43 +08:00
|
|
|
General test wrapper for HDF5 base library test programs
|
1997-07-31 05:17:56 +08:00
|
|
|
|
|
|
|
DESIGN
|
1998-01-17 06:23:43 +08:00
|
|
|
Each test function should be implemented as function having no
|
|
|
|
parameters and returning void (i.e. no return value). They should be put
|
2004-01-07 01:53:13 +08:00
|
|
|
into the list of AddTest() calls in main() below. Functions which depend
|
|
|
|
on other functionality should be placed below the AddTest() call for the
|
1998-01-17 06:23:43 +08:00
|
|
|
base functionality testing.
|
|
|
|
Each test module should include testhdf5.h and define a unique set of
|
|
|
|
names for test files they create.
|
1997-07-31 05:17:56 +08:00
|
|
|
|
|
|
|
BUGS/LIMITATIONS
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2004-01-07 01:53:13 +08:00
|
|
|
/* ANY new test needs to have a prototype in testhdf5.h */
|
2001-04-04 02:09:16 +08:00
|
|
|
#include "testhdf5.h"
|
1997-07-31 05:17:56 +08:00
|
|
|
|
1998-01-17 06:23:43 +08:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
1997-07-31 05:17:56 +08:00
|
|
|
{
|
2004-01-07 01:53:13 +08:00
|
|
|
/* Initialize testing framework */
|
2004-08-19 14:32:47 +08:00
|
|
|
TestInit(argv[0], NULL, NULL);
|
1998-03-01 02:19:05 +08:00
|
|
|
|
1997-07-31 05:17:56 +08:00
|
|
|
/* Tests are generally arranged from least to most complexity... */
|
2004-10-15 03:12:44 +08:00
|
|
|
AddTest("config", test_configure, cleanup_configure, "Configure definitions", NULL);
|
2004-03-31 07:35:16 +08:00
|
|
|
AddTest("metadata", test_metadata, cleanup_metadata, "Encode/decode metadata code", NULL);
|
|
|
|
AddTest("tst", test_tst, NULL, "Ternary Search Trees", NULL);
|
|
|
|
AddTest("heap", test_heap, NULL, "Memory Heaps", NULL);
|
2004-11-28 00:07:11 +08:00
|
|
|
AddTest("skiplist", test_skiplist, NULL, "Skip Lists", NULL);
|
2004-03-31 07:35:16 +08:00
|
|
|
AddTest("refstr", test_refstr, NULL, "Reference Counted Strings", NULL);
|
|
|
|
AddTest("file", test_file, cleanup_file, "Low-Level File I/O", NULL);
|
|
|
|
AddTest("h5s", test_h5s, cleanup_h5s, "Dataspaces", NULL);
|
|
|
|
AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL);
|
|
|
|
AddTest("select", test_select, cleanup_select, "Selections", NULL);
|
|
|
|
AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
|
|
|
|
AddTest("reference", test_reference, cleanup_reference, "References", NULL);
|
|
|
|
AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
|
|
|
|
AddTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
|
|
|
|
AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
|
|
|
|
AddTest("array", test_array, cleanup_array, "Array Datatypes", NULL);
|
|
|
|
AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
|
2005-05-24 02:20:07 +08:00
|
|
|
AddTest("unicode", test_unicode, cleanup_unicode, "UTF-8 Encoding", NULL);
|
2004-03-31 07:35:16 +08:00
|
|
|
AddTest("misc", test_misc, cleanup_misc, "Miscellaneous", NULL);
|
2004-01-07 01:53:13 +08:00
|
|
|
|
|
|
|
/* Display testing information */
|
|
|
|
TestInfo(argv[0]);
|
|
|
|
|
|
|
|
/* Parse command line arguments */
|
2004-08-19 14:32:47 +08:00
|
|
|
TestParseCmdLine(argc,argv);
|
2004-01-07 01:53:13 +08:00
|
|
|
|
|
|
|
/* Perform requested testing */
|
|
|
|
PerformTests();
|
|
|
|
|
|
|
|
/* Display test summary, if requested */
|
2004-08-19 14:32:47 +08:00
|
|
|
if (GetTestSummary())
|
2004-01-07 01:53:13 +08:00
|
|
|
TestSummary();
|
|
|
|
|
|
|
|
/* Clean up test files, if allowed */
|
2004-08-19 14:32:47 +08:00
|
|
|
if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
|
2004-01-07 01:53:13 +08:00
|
|
|
TestCleanup();
|
1998-07-11 06:00:26 +08:00
|
|
|
|
2004-01-10 09:41:13 +08:00
|
|
|
return (GetTestNumErrs());
|
1998-01-17 06:23:43 +08:00
|
|
|
} /* end main() */
|