From a83233a2c9f1fff24cffe02d4fa3fdaab3f92ff1 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 18 Jun 2004 11:18:52 -0500 Subject: [svn-r8706] *** empty log message *** --- test/dtypes.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) diff --git a/test/dtypes.c b/test/dtypes.c index 914b432..d7a0ef1 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -29,6 +29,9 @@ /* Number of elements in each test */ #define NTESTELEM 100000 +/* For test_compound_10 */ +#define ARRAY_DIM 4 + /* Define if you want to see a count of overflows */ #undef SHOW_OVERFLOWS @@ -61,6 +64,7 @@ const char *FILENAME[] = { "dtypes2", "dtypes3", "dtypes4", + "dtypes5", NULL }; @@ -1666,6 +1670,196 @@ test_compound_9(void) /*------------------------------------------------------------------------- + * Function: test_compound_10 + * + * Purpose: Tests array data type of compound type with VL string as field. + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Raymond Lu + * Tuesday, June 15, 2004 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_compound_10(void) +{ + typedef struct cmpd_struct { + int i1; + char* str; + hvl_t text; + int i2; + } cmpd_struct; + + cmpd_struct wdata[ARRAY_DIM]; + cmpd_struct rdata[ARRAY_DIM]; + hid_t file; + hid_t arr_tid, cmpd_tid, cstr_id, vlstr_id, dup_tid; + hid_t space_id; + hid_t dset_id; + hid_t xfer_pid; + hsize_t arr_dim[1] = {ARRAY_DIM}; /* Array dimensions */ + hsize_t dim1[1]; + void *t1, *t2; + char filename[1024]; + int len; + int i; + + TESTING("array data type of compound type with VL string"); + + for(i=0; i