From c90711e71362716cd9ab25d6b9167ca49edccfe8 Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Fri, 26 Feb 2010 11:55:49 -0500 Subject: [svn-r18335] Description: Removed header file testhdf5.h from C++ tests to eliminate a non-standard problem on OpenVMS. It wasn't essential. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) Ray agreed to test on OpenVMS. --- c++/test/dsets.cpp | 44 +++++++++++++++++++++----------------------- c++/test/h5cpputil.h | 4 +++- c++/test/tattr.cpp | 26 +++++++++++++------------- c++/test/tcompound.cpp | 2 +- c++/test/testhdf5.cpp | 24 ++++++++++++------------ c++/test/tfile.cpp | 10 +++++----- c++/test/tfilter.cpp | 2 +- c++/test/th5s.cpp | 14 +++++++------- c++/test/tlinks.cpp | 2 +- c++/test/trefer.cpp | 6 +++--- c++/test/ttypes.cpp | 2 +- c++/test/tvlstr.cpp | 20 ++++++++++---------- 12 files changed, 78 insertions(+), 78 deletions(-) diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 6a5f223..e860f34 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -39,7 +39,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -82,7 +81,7 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, static herr_t test_create( H5File& file) { - TESTING("create, open, close"); + SUBTEST("create, open, close"); // Setting this to NULL for cleaning up in failure situations DataSet *dataset = NULL; @@ -203,7 +202,7 @@ static herr_t test_simple_io( H5File& file) { - TESTING("simple I/O"); + SUBTEST("simple I/O"); int points[100][200]; int check[100][200]; @@ -294,7 +293,7 @@ test_tconv( H5File& file) in = new char [4*1000000]; //assert (in); - TESTING("data type conversion"); + SUBTEST("data type conversion"); // Initialize the dataset for (int i = 0; i < 1000000; i++) { @@ -449,7 +448,7 @@ test_compression(H5File& file) dscreatplist.setDeflate (6); #ifdef H5_HAVE_FILTER_DEFLATE - TESTING("compression (setup)"); + SUBTEST("Compression (setup)"); // Create the dataset dataset = new DataSet (file.createDataSet @@ -461,7 +460,7 @@ test_compression(H5File& file) * STEP 1: Read uninitialized data. It should be zero. *---------------------------------------------------------------------- */ - TESTING("compression (uninitialized read)"); + SUBTEST("Compression (uninitialized read)"); dataset->read ((void*) check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer); @@ -483,7 +482,7 @@ test_compression(H5File& file) * to it. *---------------------------------------------------------------------- */ - TESTING("compression (write)"); + SUBTEST("Compression (write)"); for (i=n=0; iread ((void*)check, PredType::NATIVE_INT, DataSpace::ALL, DataSpace::ALL, xfer); @@ -524,7 +523,7 @@ test_compression(H5File& file) * dataset although we rewrite the whole thing. *---------------------------------------------------------------------- */ - TESTING("compression (modify)"); + SUBTEST("Compression (modify)"); for (i=0; i(V)) print_func A;} +#define SUBTEST(TEST) {printf(" Subtest: %-52s",TEST); fflush(stdout);} int check_values (hsize_t i, hsize_t j, int apoint, int acheck); int test_report (int, const H5std_string&); @@ -122,6 +123,7 @@ void test_h5s(); void test_reference(); void test_types(); void test_vlstrings(); +void test_dset(); /* Prototypes for the cleanup routines */ void cleanup_attr(); diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 48a3200..6bb9ca0 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -34,7 +34,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -118,7 +117,7 @@ static void test_attr_basic_write() int i; // Output message about test being performed - SUBTEST("Testing Basic Attribute Writing Functions"); + SUBTEST("Basic Attribute Writing Functions"); try { // Create file @@ -237,7 +236,7 @@ static void test_attr_rename() int i; // Output message about test being performed - SUBTEST("Testing Rename Attribute Function"); + SUBTEST("Rename Attribute Function"); try { // Open file @@ -308,7 +307,7 @@ static void test_attr_basic_read() int i, j; // Output message about test being performed - SUBTEST("Testing Basic Attribute Reading Functions"); + SUBTEST("Basic Attribute Reading Functions"); try { // Open file @@ -375,7 +374,7 @@ static void test_attr_compound_write() { // Output message about test being performed - SUBTEST("Testing Multiple Attribute Functions"); + SUBTEST("Multiple Attribute Functions"); try { // Create file @@ -439,7 +438,7 @@ static void test_attr_compound_read() int i,j; // Output message about test being performed - SUBTEST("Testing Basic Attribute Functions"); + SUBTEST("Basic Attribute Functions"); try { // Open file @@ -568,7 +567,7 @@ static void test_attr_compound_read() static void test_attr_scalar_write() { // Output message about test being performed - SUBTEST("Testing Basic Scalar Attribute Writing Functions"); + SUBTEST("Basic Scalar Attribute Writing Functions"); try { // Create file @@ -622,7 +621,7 @@ static void test_attr_scalar_write() static void test_attr_scalar_read() { // Output message about test being performed - SUBTEST("Testing Basic Scalar Attribute Reading Functions"); + SUBTEST("Basic Scalar Attribute Reading Functions"); try { // Open file @@ -666,7 +665,7 @@ static void test_attr_scalar_read() static void test_attr_mult_write() { // Output message about test being performed - SUBTEST("Testing Multiple Attribute Writing Functions"); + SUBTEST("Multiple Attribute Writing Functions"); try { // Create file @@ -743,7 +742,7 @@ static void test_attr_mult_read() int i,j,k; // Output message about test being performed - SUBTEST("Testing Multiple Attribute Reading Functions"); + SUBTEST("Multiple Attribute Reading Functions"); try { // Open file @@ -932,7 +931,7 @@ static void test_attr_delete() H5std_string attr_name; // Buffer for attribute names // Output message about test being performed - SUBTEST("Testing Removing Attribute Function"); + SUBTEST("Removing Attribute Function"); try { // Open file @@ -1032,7 +1031,7 @@ static void test_attr_dtype_shared() h5_stat_size_t filesize; /* Size of file after modifications */ // Output message about test being performed - SUBTEST("Testing Shared Datatypes with Attributes"); + SUBTEST("Shared Datatypes with Attributes"); try { // Create a file @@ -1189,7 +1188,7 @@ const int ATTR_LEN = 17; static void test_string_attr() { // Output message about test being performed - SUBTEST("Testing I/O on FL and VL String Attributes"); + SUBTEST("I/O on FL and VL String Attributes"); try { // Create file @@ -1308,6 +1307,7 @@ extern "C" void test_attr() { // Output message about test being performed + //MESSAGE("Testing Attributes\n"); MESSAGE(5, ("Testing Attributes\n")); test_attr_basic_write(); // Test basic H5A writing code diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp index 2b1879b..fb8bd17 100644 --- a/c++/test/tcompound.cpp +++ b/c++/test/tcompound.cpp @@ -33,7 +33,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -730,6 +729,7 @@ extern "C" void test_compound() { // Output message about test being performed + //MESSAGE("Testing Compound Data Type operations\n"); MESSAGE(5, ("Testing Compound Data Type operations\n")); test_compound_1(); // various things about compound data types diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp index d61babf..fe08d6d 100644 --- a/c++/test/testhdf5.cpp +++ b/c++/test/testhdf5.cpp @@ -26,8 +26,6 @@ into the list of AddTest() calls in main() below. Functions which depend on other functionality should be placed below the AddTest() call for the base functionality testing. - Each test module should include testhdf5.h and define a unique set of - names for test files they create. EXTERNAL ROUTINES/VARIABLES: TestInit(...) -- Initialize testing framework @@ -57,7 +55,7 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file +#include "h5test.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -73,19 +71,21 @@ main(int argc, char *argv[]) TestInit(argv[0], NULL, NULL); // testing file creation and opening in tfile.cpp - AddTest("file", test_file, cleanup_file, "File I/O Operations", NULL); + AddTest("tfile", test_file, cleanup_file, "File I/O Operations", NULL); + // testing dataset functionalities in dset.cpp + AddTest("dsets", test_dset, cleanup_dsets, "Dataset I/O Operations", NULL); // testing dataspace functionalities in th5s.cpp - AddTest("h5s", test_h5s, cleanup_h5s, "Dataspaces", NULL); + AddTest("th5s", test_h5s, cleanup_h5s, "Dataspaces", NULL); // testing attribute functionalities in tattr.cpp - AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL); + AddTest("tattr", test_attr, cleanup_attr, "Attributes", NULL); // testing reference functionalities in trefer.cpp - AddTest("reference", test_reference, cleanup_reference, "References", NULL); + AddTest("trefer", test_reference, cleanup_reference, "References", NULL); // testing variable-length strings in tvlstr.cpp - AddTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL); - AddTest("types", test_types, cleanup_types, "Generic Data Types", NULL); - AddTest("compound", test_compound, cleanup_compound, "Compound Data Types", NULL); - AddTest("filter", test_filters, cleanup_filters, "Various Filters", NULL); - AddTest("links", test_links, cleanup_links, "Various Links", NULL); + AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL); + AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL); + AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL); + AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL); + AddTest("tlinks", test_links, cleanup_links, "Various Links", NULL); /* Comment out tests that are not done yet. - BMR, Feb 2001 AddTest("select", test_select, cleanup_select, "Selections", NULL); AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL); diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 71f0a60..88ffc03 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -37,7 +37,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -94,7 +93,7 @@ const H5std_string FILE4("tfile4.h5"); static void test_file_create() { // Output message about test being performed - SUBTEST("Testing File Creation I/O"); + SUBTEST("File Creation I/O"); // Test create with various sequences of H5F_ACC_EXCL and // H5F_ACC_TRUNC flags @@ -302,7 +301,7 @@ static void test_file_create() static void test_file_open() { // Output message about test being performed - SUBTEST("Testing File Opening I/O"); + SUBTEST("File Opening I/O"); try { @@ -351,7 +350,7 @@ static void test_file_open() static void test_file_size() { // Output message about test being performed - SUBTEST("Testing File Size"); + SUBTEST("File Size"); hid_t fapl_id; fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template @@ -419,7 +418,7 @@ typedef struct s1_t { static void test_file_name() { // Output message about test being performed - SUBTEST("Testing File Name"); + SUBTEST("File Name"); H5std_string file_name; try { @@ -499,6 +498,7 @@ void test_file() { // Output message about test being performed MESSAGE(5, ("Testing File I/O operations\n")); + //MESSAGE("Testing File I/O operations\n"); test_file_create(); // Test file creation (also creation templates) test_file_open(); // Test file opening diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 1d3cec2..e59707a 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -33,7 +33,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -252,6 +251,7 @@ extern "C" void test_filters() { // Output message about test being performed + //MESSAGE("Testing Various Filters\n"); MESSAGE(5, ("Testing Various Filters\n")); hid_t fapl_id; diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 258e904..58f26f0 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -36,7 +36,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -121,7 +120,7 @@ static void test_h5s_basic() hsize_t tmax[4]; // Output message about test being performed - SUBTEST("Testing Dataspace Manipulation"); + SUBTEST("Dataspace Manipulation"); try { // Create simple dataspace sid1 @@ -270,7 +269,7 @@ static void test_h5s_basic() static void test_h5s_scalar_write() { // Output message about test being performed - SUBTEST("Testing Scalar Dataspace Writing"); + SUBTEST("Scalar Dataspace Writing"); try { // Create file @@ -336,7 +335,7 @@ static void test_h5s_scalar_read() hsize_t tdims[4]; // Dimension array to test with // Output message about test being performed - SUBTEST("Testing Scalar Dataspace Reading"); + SUBTEST("Scalar Dataspace Reading"); try { // Create file @@ -396,7 +395,7 @@ static void test_h5s_scalar_read() static void test_h5s_null() { // Output message about test being performed - SUBTEST("Testing Null Dataspace Writing"); + SUBTEST("Null Dataspace Writing"); try { // Create file @@ -451,7 +450,7 @@ static void test_h5s_null() static void test_h5s_compound_scalar_write() { // Output message about test being performed - SUBTEST("Testing Compound Dataspace Writing"); + SUBTEST("Compound Dataspace Writing"); try { // Create file @@ -526,7 +525,7 @@ static void test_h5s_compound_scalar_read() hsize_t tdims[4]; // Dimension array to test with // Output message about test being performed - SUBTEST("Testing Compound Dataspace Reading"); + SUBTEST("Compound Dataspace Reading"); try { // Create file H5File fid1(DATAFILE, H5F_ACC_RDWR); @@ -594,6 +593,7 @@ extern "C" void test_h5s() { // Output message about test being performed + //MESSAGE("Testing Dataspaces\n"); MESSAGE(5, ("Testing Dataspaces\n")); test_h5s_basic(); // Test basic H5S code diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index 870efae..53a1c8c 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -33,7 +33,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -531,6 +530,7 @@ void test_links() fapl_id = h5_fileaccess(); // Output message about test being performed + //MESSAGE("Testing Various Links\n"); MESSAGE(5, ("Testing Various Links\n")); try { diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index c4ac93b..3875dfd 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -34,7 +34,6 @@ #endif // H5_NO_STD #endif -#include "testhdf5.h" // C test header file #include "H5Cpp.h" // C++ API header file #ifndef H5_NO_NAMESPACE @@ -82,7 +81,7 @@ static void test_reference_obj(void) const H5std_string write_comment="Foo!"; // Comments for group // Output message about test being performed - SUBTEST("Testing Object Reference Functions"); + SUBTEST("Object Reference Functions"); H5File* file1 = NULL; try { @@ -205,7 +204,7 @@ static void test_reference_obj(void) dset2.read(tbuf, PredType::NATIVE_UINT); for(tu32=(unsigned *)tbuf,i=0; i