diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-05-05 15:05:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-05-05 15:05:17 (GMT) |
commit | 548eec307006ebd01294fad2886421f07c3c92c8 (patch) | |
tree | f12a7a425e7c90e8895a205491fd8a85d21d5e90 /hl/test | |
parent | 4ffc0b6acb36064e91a1afeb6eceee704e5af7f2 (diff) | |
download | hdf5-548eec307006ebd01294fad2886421f07c3c92c8.zip hdf5-548eec307006ebd01294fad2886421f07c3c92c8.tar.gz hdf5-548eec307006ebd01294fad2886421f07c3c92c8.tar.bz2 |
[svn-r16920] Description:
Merge these trunk revisions which occurred during the 1.8.3 release code
freeze back to the 1.8 branch:
From Quincey: 16845 16847 16849 16851 16858 16869 16897
From Ray: 16859 16880
From Allen: 16863
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'hl/test')
-rw-r--r-- | hl/test/Makefile.am | 2 | ||||
-rw-r--r-- | hl/test/test_lite.c | 33 |
2 files changed, 26 insertions, 9 deletions
diff --git a/hl/test/Makefile.am b/hl/test/Makefile.am index 99832e8..1e8a380 100644 --- a/hl/test/Makefile.am +++ b/hl/test/Makefile.am @@ -33,7 +33,7 @@ TEST_PROG=test_lite test_image test_table test_ds test_packet check_PROGRAMS=$(TEST_PROG) # Temporary files. These files are the ones created by running `make test'. -CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-6].h5 test_image[1-3].h5 \ +CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-7].h5 test_image[1-3].h5 \ test_lite[1-2].h5 test_table.h5 test_packet_table.h5 \ test_packet_compress.h5 diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 6de2e31..ad12fb2 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1291,6 +1291,7 @@ static int test_enums(void) H5T_class_t type_class; char* dt_str; size_t str_len; + H5T_order_t native_order = H5Tget_order(H5T_NATIVE_INT); TESTING3(" text for enum types"); @@ -1302,6 +1303,12 @@ static int test_enums(void) if(type_class != H5T_ENUM) goto out; + /* Convert the variable before using it */ + if(!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) { + if(H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value1, NULL, H5P_DEFAULT) < 0) + goto out; + } + if(H5Tenum_nameof(dtype, &value1, name1, size)<0) goto out; if(strcmp(name1, "BLUE")) @@ -1309,6 +1316,13 @@ static int test_enums(void) if(H5Tenum_valueof(dtype, name2, &value2)<0) goto out; + + /* Convert the variable before comparing it */ + if(!H5Tequal(H5T_STD_I32LE, H5T_NATIVE_INT)) { + if(H5Tconvert(H5T_NATIVE_INT, H5T_STD_I32LE, 1, &value2, NULL, H5P_DEFAULT) < 0) + goto out; + } + if(value2 != 8) goto out; @@ -1317,10 +1331,12 @@ static int test_enums(void) dt_str = (char*)calloc(str_len, sizeof(char)); if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) goto out; - /*if(strcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) { - printf("dt=\n%s\n", dt_str); - goto out; - }*/ + if(strcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) { + + printf("dt=\n%s\n", dt_str); + goto out; + } + free(dt_str); if(H5Tclose(dtype)<0) @@ -1427,10 +1443,11 @@ static int test_arrays(void) dt_str = (char*)calloc(str_len, sizeof(char)); if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0) goto out; - /*if(strcmp(dt_str, "H5T_ARRAY { [5][7][13] H5T_ARRAY { [17][19] H5T_COMPOUND { H5T_STD_I8BE \"arr_compound_1\"; H5T_STD_I32BE \"arr_compound_2\"; } } }")) { - printf("dt=\n%s\n", dt_str); - goto out; - }*/ + if(strcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE \"arr_compound_2\" : 1;\n }\n }\n }")) { + printf("dt=\n%s\n", dt_str); + goto out; + } + free(dt_str); if(H5Tclose(dtype)<0) |