diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2006-05-17 18:09:12 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2006-05-17 18:09:12 (GMT) |
commit | 0f98d2009b6c3a190d7303170468a1f711e1b00a (patch) | |
tree | 6e885e6424b33ab8184ab6681889bdb254e606ab /hl/test | |
parent | b562825fc5b7555ec39c55dbcd002dde8cdfafec (diff) | |
download | hdf5-0f98d2009b6c3a190d7303170468a1f711e1b00a.zip hdf5-0f98d2009b6c3a190d7303170468a1f711e1b00a.tar.gz hdf5-0f98d2009b6c3a190d7303170468a1f711e1b00a.tar.bz2 |
[svn-r12351] Purpose: Follow-up what's committed yesterday.
Description: Yesterday, a definition of the macro YY_BUF_SIZE of 256KB
was committed in, but copper complained it can't be redefined.
Solution: Added #ifdef and #undef to make sure the macro is undefined
first. Also integrated a complicated compound type test. It reads
input from a text file. The datatype is unusually large, of 101 member
fields.
Platforms tested: h5committest and fuss.
Diffstat (limited to 'hl/test')
-rw-r--r-- | hl/test/dtype_file.txt | 1 | ||||
-rw-r--r-- | hl/test/test_lite.c | 88 |
2 files changed, 89 insertions, 0 deletions
diff --git a/hl/test/dtype_file.txt b/hl/test/dtype_file.txt new file mode 100644 index 0000000..0ccae94 --- /dev/null +++ b/hl/test/dtype_file.txt @@ -0,0 +1 @@ +H5T_COMPOUND { H5T_NATIVE_INT "rs#"; H5T_ENUM { H5T_NATIVE_CHAR; "A/A" 0; "A/C" 1; "A/T" 2; "A/G" 3; "A/N" 4; "C/A" 5; "C/C" 6; "C/T" 7; "C/G" 8; "C/N" 9; "T/A" 10; "T/C" 11; "T/T" 12; "T/G" 13; "T/N" 14; "G/A" 15; "G/C" 16; "G/T" 17; "G/G" 18; "G/N" 19; "N/A" 20; "N/C" 21; "N/T" 22; "N/G" 23; "N/N" 24; } "SNPAllelels"; H5T_NATIVE_INT "chrom"; H5T_NATIVE_INT "pos"; H5T_ENUM { H5T_NATIVE_CHAR; "+" 0; "-" 1; } "strand"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } "genome_build"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } "center"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } "protLSID"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; }"assayLSID"; H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } "panelLSID"; H5T_ENUM { H5T_NATIVE_CHAR; "+" 0; "-" 1; } "QC_code"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA06985"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA06991"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA06993"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA06994"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07000"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07019"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07022"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07029"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07034"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07048"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07055"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07056"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07345"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07348"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA07357"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10830"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10831"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10835"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10838"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10839"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10846"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10847"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10851"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10854"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10855"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10856"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10857"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10859"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10860"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10861"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA10863"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11829"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11830"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11831"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11832"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11839"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11840"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11881"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11882"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11992"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11993"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11994"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA11995"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12003"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12004"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12005"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12006"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12043"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12044"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12056"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12057"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12144"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12145"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12146"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12154"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12155"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12156"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12234"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12236"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12239"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12248"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12249"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12264"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12707"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12716"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12717"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12740"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12750"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12751"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12752"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12753"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12760"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12761"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12762"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12763"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12801"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12802"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12812"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12813"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12814"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12815"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12864"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12865"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12872"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12873"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12874"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12875"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12878"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12891"; H5T_ENUM { H5T_NATIVE_CHAR; "AA" 0; "AC" 1; "AT" 2; "AG" 3; "AN" 4; "CA" 5; "CC" 6; "CT" 7; "CG" 8; "CN" 9; "TA" 10; "TC" 11; "TT" 12; "TG" 13; "TN" 14; "GA" 15; "GC" 16; "GT" 17; "GG" 18; "GN" 19; "NA" 20; "NC" 21; "NT" 22; "NG" 23; "NN" 24; } "NA12892";} diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 705cf3a..07002e0 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -19,6 +19,7 @@ #define FILE_NAME "test_lite1.h5" #define FILE_NAME2 "test_lite2.h5" +#define INPUT_FILE "dtype_file.txt" #define DSET0_NAME "2D int array" #define DSET1_NAME "dataset char" @@ -43,6 +44,9 @@ #define ATTR10_NAME "attr float" #define ATTR11_NAME "attr double" +/*Initial input buffer size for testing H5LTtext_to_dtype()*/ +#define BUF_SIZE 1024 + static herr_t make_attributes( hid_t loc_id, const char* obj_name ); @@ -1513,6 +1517,87 @@ out: } /*------------------------------------------------------------------------- + * subroutine for test_text_dtype(): test_complicated_compound(). + *------------------------------------------------------------------------- + */ +static int test_complicated_compound(void) +{ + hid_t dtype; + int nmembs; + H5T_class_t type_class; + size_t str_len; + char* line=NULL; + FILE *fp; + int size = 1024; + char *srcdir = getenv("srcdir"); /* the source directory */ + char filename[1024]=""; + + TESTING3(" text for complicated compound types"); + + /* compose the name of the file to open, using the srcdir, if appropriate */ + if(srcdir) + { + strcpy(filename, srcdir); + strcat(filename, "/"); + } + strcat(filename, INPUT_FILE); + + /* Open input file */ + fp = fopen(filename, "r"); + if(fp == NULL) + { + printf( "Could not find file %s. Try set $srcdir \n", filename); + goto out; + } + + /* This part reads in the input as a string in a slow manner. GNU C + * Library has convenient function getline() but isn't available on + * all machines. + */ + if((line = (char*)calloc(size, sizeof(char)))==NULL) + goto out; + if(fgets(line, size, fp)==NULL) + goto out; + while(strlen(line)==size-1) { + size *= 2; + if(line) + free(line); + if((line = (char*)calloc(size, sizeof(char)))==NULL) + goto out; + if(fseek(fp, 0L, SEEK_SET)!=0) + goto out; + if(fgets(line, size, fp)==NULL) + goto out; + } + + fclose(fp); + + if((dtype = H5LTtext_to_dtype(line, H5LT_DDL))<0) + goto out; + + if((type_class = H5Tget_class(dtype))<0) + goto out; + if(type_class != H5T_COMPOUND) + goto out; + + /* There should be 101 compound members */ + if((nmembs = H5Tget_nmembers(dtype))<0) + goto out; + if(nmembs != 101) + goto out; + + if(line) + free(line); + + PASSED(); + return 0; + +out: + H5_FAILED(); + return -1; +} + +/*------------------------------------------------------------------------- * test H5LTtext_to_dtype function *------------------------------------------------------------------------- */ @@ -1543,6 +1628,9 @@ static int test_text_dtype(void) if(test_compounds()<0) goto out; + + if(test_complicated_compound()<0) + goto out; return 0; |