summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-06-27 14:45:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-06-27 14:45:06 (GMT)
commit7be3afb278aea67ba09a97f4b41c0aaaf5c47983 (patch)
tree24ed86ab2a5c982fbf182d2ac8cd892c3813bc34 /hl/test
parent8d72542a50fac7a747fe0bfec8d2285de8efd29f (diff)
downloadhdf5-7be3afb278aea67ba09a97f4b41c0aaaf5c47983.zip
hdf5-7be3afb278aea67ba09a97f4b41c0aaaf5c47983.tar.gz
hdf5-7be3afb278aea67ba09a97f4b41c0aaaf5c47983.tar.bz2
[svn-r12440] Purpose:
Code cleanup Description: Trim trailing whitespace in Makefile.am and C/C++ source files to make diffing changes easier. Platforms tested: None necessary, whitespace only change
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/test_lite.c170
1 files changed, 85 insertions, 85 deletions
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 07002e0..19d772f 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1057,31 +1057,31 @@ static int test_integers(void)
size_t str_len;
TESTING3("\n text for integer types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_NATIVE_INT\n", H5LT_DDL))<0)
goto out;
if(!H5Tequal(dtype, H5T_NATIVE_INT))
goto out;
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_STD_I8BE\n", H5LT_DDL))<0)
goto out;
if(!H5Tequal(dtype, H5T_STD_I8BE))
goto out;
-
+
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_STD_I8BE"))
goto out;
free(dt_str);
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_STD_U16LE\n", H5LT_DDL))<0)
goto out;
if(!H5Tequal(dtype, H5T_STD_U16LE))
@@ -1108,31 +1108,31 @@ static int test_fps(void)
size_t str_len;
TESTING3(" text for floating-point types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_NATIVE_LDOUBLE\n", H5LT_DDL))<0)
goto out;
if(!H5Tequal(dtype, H5T_NATIVE_LDOUBLE))
goto out;
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_IEEE_F32BE\n", H5LT_DDL))<0)
goto out;
if(!H5Tequal(dtype, H5T_IEEE_F32BE))
goto out;
-
+
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_IEEE_F32BE"))
goto out;
free(dt_str);
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_IEEE_F64LE\n", H5LT_DDL))<0)
goto out;
if(!H5Tequal(dtype, H5T_IEEE_F64LE))
@@ -1161,12 +1161,12 @@ static int test_strings(void)
H5T_class_t type_class;
char* dt_str;
size_t str_len;
-
+
TESTING3(" text for string types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_STRING { STRSIZE 13; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; }", H5LT_DDL))<0)
goto out;
-
+
if((type_class = H5Tget_class(dtype))<0)
goto out;
if(type_class != H5T_STRING)
@@ -1175,57 +1175,57 @@ static int test_strings(void)
str_size = H5Tget_size(dtype);
if(str_size != 13)
goto out;
-
+
str_pad = H5Tget_strpad(dtype);
if(str_pad != H5T_STR_NULLTERM)
goto out;
-
+
str_cset = H5Tget_cset(dtype);
if(str_cset != H5T_CSET_ASCII)
goto out;
-
+
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
printf("dt=\n%s\n", dt_str);
goto out;
}
free(dt_str);
-
+
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_STRING { STRSIZE H5T_VARIABLE; STRPAD H5T_STR_NULLPAD; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; }", H5LT_DDL))<0)
goto out;
-
+
if(!H5Tis_variable_str(dtype))
goto out;
-
+
str_pad = H5Tget_strpad(dtype);
if(str_pad != H5T_STR_NULLPAD)
goto out;
-
+
str_cset = H5Tget_cset(dtype);
if(str_cset != H5T_CSET_ASCII)
goto out;
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) {
printf("dt=\n%s\n", dt_str);
goto out;
}
free(dt_str);
-
+
if(H5Tclose(dtype)<0)
goto out;
-
+
PASSED();
return 0;
@@ -1247,25 +1247,25 @@ static int test_opaques(void)
size_t str_len;
TESTING3(" text for opaque types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_OPAQUE { OPQ_SIZE 19; OPQ_TAG \"This is a tag for opaque type\"; }", H5LT_DDL))<0)
goto out;
-
+
if((type_class = H5Tget_class(dtype))<0)
goto out;
if(type_class != H5T_OPAQUE)
goto out;
-
+
if((opq_size = H5Tget_size(dtype)) == 0)
goto out;
if(opq_size != 19)
goto out;
-
+
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }")) {
printf("dt=\n%s\n", dt_str);
goto out;
@@ -1274,7 +1274,7 @@ static int test_opaques(void)
if(H5Tclose(dtype)<0)
goto out;
-
+
PASSED();
return 0;
@@ -1298,12 +1298,12 @@ static int test_enums(void)
H5T_class_t type_class;
char* dt_str;
size_t str_len;
-
+
TESTING3(" text for enum types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_ENUM { H5T_STD_I32LE; \"RED\" 5; \"GREEN\" 6; \"BLUE\" 7; \"WHITE\" 8; }", H5LT_DDL))<0)
goto out;
-
+
if((type_class = H5Tget_class(dtype))<0)
goto out;
if(type_class != H5T_ENUM)
@@ -1312,27 +1312,27 @@ static int test_enums(void)
if(H5Tenum_nameof(dtype, &value1, name1, size)<0)
goto out;
if(strcmp(name1, "BLUE"))
- goto out;
-
+ goto out;
+
if(H5Tenum_valueof(dtype, name2, &value2)<0)
goto out;
if(value2 != 8)
goto out;
-
+
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ 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)
goto out;
-
+
PASSED();
return 0;
@@ -1351,34 +1351,34 @@ static int test_variables(void)
H5T_class_t type_class;
char* dt_str;
size_t str_len;
-
+
TESTING3(" text for variable types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_VLEN { H5T_NATIVE_CHAR }\n", H5LT_DDL))<0)
goto out;
-
+
if((type_class = H5Tget_class(dtype))<0)
goto out;
if(type_class != H5T_VLEN)
goto out;
-
+
if(H5Tis_variable_str(dtype))
goto out;
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_VLEN { H5T_VLEN { H5T_STD_I32BE } }", H5LT_DDL))<0)
goto out;
-
+
if(H5Tis_variable_str(dtype))
goto out;
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }")) {
printf("dt=\n%s\n", dt_str);
goto out;
@@ -1387,7 +1387,7 @@ static int test_variables(void)
if(H5Tclose(dtype)<0)
goto out;
-
+
PASSED();
return 0;
@@ -1410,19 +1410,19 @@ static int test_arrays(void)
size_t str_len;
TESTING3(" text for array types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_ARRAY { [5][7][13] H5T_ARRAY { [17][19] H5T_COMPOUND { H5T_STD_I8BE \"arr_compound_1\"; H5T_STD_I32BE \"arr_compound_2\"; } } }", H5LT_DDL))<0)
goto out;
-
+
if((type_class = H5Tget_class(dtype))<0)
goto out;
if(type_class != H5T_ARRAY)
goto out;
-
+
if((ndims = H5Tget_array_ndims(dtype))<0)
goto out;
if(ndims != 3)
- goto out;
+ goto out;
if(H5Tget_array_dims(dtype, dims, NULL)<0)
goto out;
@@ -1430,10 +1430,10 @@ static int test_arrays(void)
goto out;
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ 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;
@@ -1442,7 +1442,7 @@ static int test_arrays(void)
if(H5Tclose(dtype)<0)
goto out;
-
+
PASSED();
return 0;
@@ -1464,12 +1464,12 @@ static int test_compounds(void)
H5T_class_t type_class;
char* dt_str;
size_t str_len;
-
+
TESTING3(" text for compound types");
-
+
if((dtype = H5LTtext_to_dtype("H5T_COMPOUND { H5T_STD_I16BE \"one_field\" : 2; H5T_STD_U8LE \"two_field\" : 6; }", H5LT_DDL))<0)
goto out;
-
+
if((type_class = H5Tget_class(dtype))<0)
goto out;
if(type_class != H5T_COMPOUND)
@@ -1481,26 +1481,26 @@ static int test_compounds(void)
goto out;
if(H5LTdtype_to_text(dtype, NULL, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
dt_str = (char*)calloc(str_len, sizeof(char));
if(H5LTdtype_to_text(dtype, dt_str, H5LT_DDL, &str_len)<0)
- goto out;
+ goto out;
if(strcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE \"two_field\" : 6;\n }")) {
printf("dt=\n%s\n", dt_str);
goto out;
}
free(dt_str);
-
+
if(H5Tclose(dtype)<0)
goto out;
-
+
if((dtype = H5LTtext_to_dtype("H5T_COMPOUND { H5T_STD_I32BE \"i32_field\"; H5T_STD_I16BE \"i16_field\"; H5T_COMPOUND { H5T_STD_I16BE \"sec_field\"; H5T_COMPOUND { H5T_STD_I32BE \"thd_field\"; } \"grandchild\"; } \"child_compound\"; H5T_STD_I8BE \"i8_field\"; }", H5LT_DDL))<0)
goto out;
-
+
if((memb_name = H5Tget_member_name(dtype, 1)) == NULL)
- goto out;
+ goto out;
if(strcmp(memb_name, "i16_field"))
- goto out;
+ goto out;
free(memb_name);
if((memb_class = H5Tget_member_class(dtype, 2))<0)
@@ -1531,7 +1531,7 @@ static int test_complicated_compound(void)
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 */
@@ -1550,8 +1550,8 @@ static int test_complicated_compound(void)
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
+ /* 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)
@@ -1574,13 +1574,13 @@ static int test_complicated_compound(void)
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 */
+ /* There should be 101 compound members */
if((nmembs = H5Tget_nmembers(dtype))<0)
goto out;
if(nmembs != 101)
@@ -1601,7 +1601,7 @@ out:
* test H5LTtext_to_dtype function
*-------------------------------------------------------------------------
*/
-static int test_text_dtype(void)
+static int test_text_dtype(void)
{
TESTING("H5LTtext_to_dtype");
@@ -1613,22 +1613,22 @@ static int test_text_dtype(void)
if(test_strings()<0)
goto out;
-
+
if(test_opaques()<0)
goto out;
-
+
if(test_enums()<0)
goto out;
-
+
if(test_variables()<0)
goto out;
-
+
if(test_arrays()<0)
goto out;
-
+
if(test_compounds()<0)
goto out;
-
+
if(test_complicated_compound()<0)
goto out;
@@ -1651,7 +1651,7 @@ int main( void )
/* test attribute functions */
nerrors += test_attr();
-
+
/* test text-dtype functions */
nerrors += test_text_dtype();