summaryrefslogtreecommitdiffstats
path: root/hl/test/test_lite.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2009-04-24 21:13:20 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2009-04-24 21:13:20 (GMT)
commitcdcd4a73058091fa1c5035bd81d1b057f1ab19d4 (patch)
treed63b77c9b836bc370f302d44ce8f1864aada003d /hl/test/test_lite.c
parent8dd1e72365158f9b82c624fa7fdd6340849111ab (diff)
downloadhdf5-cdcd4a73058091fa1c5035bd81d1b057f1ab19d4.zip
hdf5-cdcd4a73058091fa1c5035bd81d1b057f1ab19d4.tar.gz
hdf5-cdcd4a73058091fa1c5035bd81d1b057f1ab19d4.tar.bz2
[svn-r16859] I fixed some memory leak of H5LTdtype_to_text in the HL library. I fixed some test
verification, too. Tested on jam - simple change.
Diffstat (limited to 'hl/test/test_lite.c')
-rw-r--r--hl/test/test_lite.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 6de2e31..8c9fb30 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1317,10 +1317,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 +1429,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)