summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cache.c48
-rw-r--r--test/cache_api.c115
-rw-r--r--test/cache_common.c43
-rw-r--r--test/dt_arith.c229
4 files changed, 122 insertions, 313 deletions
diff --git a/test/cache.c b/test/cache.c
index b9525ea..eeb9038 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -9231,7 +9231,6 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
hbool_t show_progress = FALSE;
hbool_t verbose = FALSE;
herr_t result;
- int target_test = -1;
int i;
int j;
test_entry_t * base_addr;
@@ -9242,11 +9241,6 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
test_num);
#endif
- if ( ( target_test > 0 ) && ( test_num != target_test ) ) {
-
- show_progress = FALSE;
- }
-
if ( show_progress ) {
HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(1).\n",
@@ -28700,9 +28694,6 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) {
max_size = 0;
- min_clean_size = 0;
- cur_size = 0;
- cur_num_entries = 0;
result = H5C_get_cache_size(cache_ptr, &max_size, NULL, NULL, NULL);
@@ -28717,22 +28708,12 @@ check_auto_cache_resize_aux_fcns(void)
failure_mssg =
"H5C_get_cache_size reports unexpected max_size 3.\n";
- } else if ( ( min_clean_size != 0 ) ||
- ( cur_size != 0 ) ||
- ( cur_num_entries != 0 ) ) {
-
- pass = FALSE;
- failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
-
}
}
if ( pass ) {
- max_size = 0;
min_clean_size = 0;
- cur_size = 0;
- cur_num_entries = 0;
result = H5C_get_cache_size(cache_ptr, NULL, &min_clean_size,
NULL, NULL);
@@ -28748,22 +28729,12 @@ check_auto_cache_resize_aux_fcns(void)
failure_mssg =
"H5C_get_cache_size reports unexpected min_clean_size 4.\n";
- } else if ( ( max_size != 0 ) ||
- ( cur_size != 0 ) ||
- ( cur_num_entries != 0 ) ) {
-
- pass = FALSE;
- failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
-
}
}
if ( pass ) {
- max_size = 0;
- min_clean_size = 0;
cur_size = 0;
- cur_num_entries = 0;
result = H5C_get_cache_size(cache_ptr, NULL, NULL, &cur_size, NULL);
@@ -28779,21 +28750,11 @@ check_auto_cache_resize_aux_fcns(void)
failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 5.\n";
- } else if ( ( max_size != 0 ) ||
- ( min_clean_size != 0 ) ||
- ( cur_num_entries != 0 ) ) {
-
- pass = FALSE;
- failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
-
- }
+ }
}
if ( pass ) {
- max_size = 0;
- min_clean_size = 0;
- cur_size = 0;
cur_num_entries = 0;
result = H5C_get_cache_size(cache_ptr, NULL, NULL, NULL,
@@ -28810,13 +28771,6 @@ check_auto_cache_resize_aux_fcns(void)
failure_mssg =
"H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
- } else if ( ( max_size != 0 ) ||
- ( min_clean_size != 0 ) ||
- ( cur_size != 0 ) ) {
-
- pass = FALSE;
- failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
-
}
}
diff --git a/test/cache_api.c b/test/cache_api.c
index ad5c823..ee17037 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -1381,7 +1381,6 @@ mdc_api_call_smoke_check(int express_test)
const char * fcn_name = "mdc_api_call_smoke_check()";
char filename[512];
hbool_t valid_chunk;
- hbool_t report_progress = FALSE;
hbool_t dump_hit_rate = FALSE;
int64_t min_accesses = 1000;
double min_hit_rate = 0.90;
@@ -1524,13 +1523,6 @@ mdc_api_call_smoke_check(int express_test)
*/
/* setup the file name */
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout,"\nSetting up file ... ");
- HDfflush(stdout);
- }
-
if ( pass ) {
if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
@@ -1569,21 +1561,7 @@ mdc_api_call_smoke_check(int express_test)
/* verify that the cache is now set to the alternate config */
validate_mdc_config(file_id, &mod_config_1, TRUE, 2);
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout,"Done.\n"); /* setting up file */
- HDfflush(stdout);
- }
-
-
/* create the datasets */
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout,"Creating datasets ... ");
- HDfflush(stdout);
- }
-
if ( pass ) {
i = 0;
@@ -1688,22 +1666,10 @@ mdc_api_call_smoke_check(int express_test)
}
}
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout,"Done.\n");
- HDfflush(stdout);
- }
-
/* initialize all datasets on a round robin basis */
i = 0;
progress_counter = 0;
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout, "Initializing datasets ");
- HDfflush(stdout);
- }
-
while ( ( pass ) && ( i < DSET_SIZE ) )
{
j = 0;
@@ -1770,23 +1736,6 @@ mdc_api_call_smoke_check(int express_test)
i += CHUNK_SIZE;
- if ( ( pass ) && ( report_progress ) ) {
-
- progress_counter += CHUNK_SIZE;
-
- if ( progress_counter >= DSET_SIZE / 20 ) {
-
- progress_counter = 0;
- HDfprintf(stdout, ".");
- HDfflush(stdout);
- }
- }
- }
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout," Done.\n"); /* initializing data sets */
- HDfflush(stdout);
}
/* set alternate config 2 */
@@ -1803,13 +1752,6 @@ mdc_api_call_smoke_check(int express_test)
validate_mdc_config(file_id, &mod_config_2, TRUE, 3);
/* do random reads on all datasets */
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout, "Doing random reads on all datasets ");
- HDfflush(stdout);
- }
-
n = 0;
progress_counter = 0;
while ( ( pass ) && ( n < NUM_RANDOM_ACCESSES ) )
@@ -1895,26 +1837,8 @@ mdc_api_call_smoke_check(int express_test)
n++;
- if ( ( pass ) && ( report_progress ) ) {
-
- progress_counter++;
-
- if ( progress_counter >= NUM_RANDOM_ACCESSES / 20 ) {
-
- progress_counter = 0;
- HDfprintf(stdout, ".");
- HDfflush(stdout);
- }
- }
- }
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout, " Done.\n"); /* random reads on all data sets */
- HDfflush(stdout);
}
-
/* close the file spaces we are done with */
i = 1;
while ( ( pass ) && ( i < NUM_DSETS ) )
@@ -1954,13 +1878,6 @@ mdc_api_call_smoke_check(int express_test)
validate_mdc_config(file_id, &mod_config_3, TRUE, 4);
/* do random reads on data set 0 only */
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout, "Doing random reads on dataset 0 ");
- HDfflush(stdout);
- }
-
m = 0;
n = 0;
progress_counter = 0;
@@ -2042,33 +1959,8 @@ mdc_api_call_smoke_check(int express_test)
n++;
- if ( ( pass ) && ( report_progress ) ) {
-
- progress_counter++;
-
- if ( progress_counter >= NUM_RANDOM_ACCESSES / 20 ) {
-
- progress_counter = 0;
- HDfprintf(stdout, ".");
- HDfflush(stdout);
- }
- }
- }
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout, " Done.\n"); /* random reads data set 0 */
- HDfflush(stdout);
- }
-
-
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout,"Shutting down ... ");
- HDfflush(stdout);
}
-
/* close file space 0 */
if ( pass ) {
@@ -2125,13 +2017,6 @@ mdc_api_call_smoke_check(int express_test)
}
}
- if ( ( pass ) && ( report_progress ) ) {
-
- HDfprintf(stdout,"Done.\n"); /* shutting down */
- HDfflush(stdout);
- }
-
-
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
diff --git a/test/cache_common.c b/test/cache_common.c
index 4768f53..c4e4fe9 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3634,7 +3634,6 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
hbool_t pin_flag_set;
hbool_t unpin_flag_set;
hbool_t size_changed_flag_set;
- hbool_t verbose = FALSE;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -3685,39 +3684,25 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
( entry_ptr->size != entry_ptr->header.size ) ||
( entry_ptr->addr != entry_ptr->header.addr ) ) {
- if ( verbose ) {
+ if ( result < 0 )
+ HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name);
- if ( result < 0 ) {
- HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name);
- }
+ if ( entry_ptr->header.is_protected )
+ HDfprintf(stdout, "%s: entry still protected?!?.\n", fcn_name);
- if ( entry_ptr->header.is_protected ) {
- HDfprintf(stdout, "%s: entry still protected?!?.\n",
- fcn_name);
- }
+ if ( entry_ptr->header.type != &(types[type]) )
+ HDfprintf(stdout, "%s: entry has bad type after unprotect.\n", fcn_name);
- if ( entry_ptr->header.type != &(types[type]) ) {
- HDfprintf(stdout,
- "%s: entry has bad type after unprotect.\n",
- fcn_name);
- }
+ if ( entry_ptr->size != entry_ptr->header.size )
+ HDfprintf(stdout, "%s: bad entry size after unprotect. e/a = %d/%d\n", fcn_name,
+ (int)(entry_ptr->size),
+ (int)(entry_ptr->header.size));
- if ( entry_ptr->size != entry_ptr->header.size ) {
- HDfprintf(stdout,
- "%s: bad entry size after unprotect. e/a = %d/%d\n",
- fcn_name,
- (int)(entry_ptr->size),
- (int)(entry_ptr->header.size));
- }
+ if ( entry_ptr->addr != entry_ptr->header.addr )
+ HDfprintf(stdout, "%s: bad entry addr after unprotect. e/a = 0x%llx/0x%llx\n", fcn_name,
+ (long long)(entry_ptr->addr),
+ (long long)(entry_ptr->header.addr));
- if ( entry_ptr->addr != entry_ptr->header.addr ) {
- HDfprintf(stdout,
- "%s: bad entry addr after unprotect. e/a = 0x%llx/0x%llx\n",
- fcn_name,
- (long long)(entry_ptr->addr),
- (long long)(entry_ptr->header.addr));
- }
- }
pass = FALSE;
failure_mssg = "error in H5C_unprotect().";
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 420570a..13cf5ba 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -5001,192 +5001,177 @@ run_int_fp_conv(const char *name)
static int
run_fp_int_conv(const char *name)
{
+#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS
int nerrors = 0;
int test_values;
- int i;
- int run_test = TRUE;
-#ifndef H5_FP_TO_INTEGER_OVERFLOW_WORKS
- /* For Cray X1, the compiler generates floating exception when the
- * conversion overflows. So disable all of the conversions from
- * floating-point numbers to integers.
- */
- run_test = FALSE;
-#endif
-
-#ifdef H5_VMS
- run_test = TRUE;
-#endif
-
- if(run_test) {
#ifdef H5_VMS
- test_values = TEST_NORMAL;
- {
+ test_values = TEST_NORMAL;
#else
- for(i=0; i<3; i++) {
- if(i==0)
- test_values = TEST_NORMAL;
- else if(i==1)
- test_values = TEST_DENORM;
- else
- test_values = TEST_SPECIAL;
+ for(test_values = TEST_NORMAL; test_values <= TEST_SPECIAL; test_values++) {
#endif /*H5_VMS*/
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SCHAR);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SCHAR);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SCHAR);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SCHAR);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_UCHAR);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_UCHAR);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SHORT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SHORT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_USHORT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_USHORT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_INT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_INT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_INT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_INT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_UINT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_UINT);
#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_ULONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_ULONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULONG);
#endif
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
- if(!strcmp(name, "hw")) { /* Hardware conversion */
- /* Windows .NET 2003 doesn't work for hardware conversion of this case.
- * .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */
+ if(!strcmp(name, "hw")) { /* Hardware conversion */
+ /* Windows .NET 2003 doesn't work for hardware conversion of this case.
+ * .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */
#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
#endif /*H5_HW_FP_TO_LLONG_NOT_WORKS*/
- } else { /* Software conversion */
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
- }
+ } else { /* Software conversion */
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
+ }
#ifdef H5_FP_TO_ULLONG_RIGHT_MAXIMUM
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_ULLONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_ULLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULLONG);
#else /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
- {
- char str[256]; /*hello string */
-
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "float", "unsigned long long");
- printf("%-70s", str);
- SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
-
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "double", "unsigned long long");
- printf("%-70s", str);
- SKIPPED();
- HDputs(" Test skipped due to hardware conversion error.");
- }
+ {
+ char str[256]; /*hello string */
+
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "float", "unsigned long long");
+ printf("%-70s", str);
+ SKIPPED();
+ HDputs(" Test skipped due to hardware conversion error.");
+
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "double", "unsigned long long");
+ printf("%-70s", str);
+ SKIPPED();
+ HDputs(" Test skipped due to hardware conversion error.");
+ }
#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
#endif
#if H5_LDOUBLE_TO_INTEGER_WORKS && H5_LDOUBLE_TO_INTEGER_ACCURATE
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_SCHAR);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UCHAR);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_SHORT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_USHORT);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_INT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_SCHAR);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_INT);
#if H5_LDOUBLE_TO_UINT_ACCURATE
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UINT);
#else /*H5_LDOUBLE_TO_UINT_ACCURATE*/
- {
- char str[256]; /*string */
+ {
+ char str[256]; /*string */
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "long double", "unsigned int");
- printf("%-70s", str);
- SKIPPED();
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "long double", "unsigned int");
+ printf("%-70s", str);
+ SKIPPED();
#if H5_SIZEOF_LONG_DOUBLE!=0
- HDputs(" Test skipped due to hardware conversion error.");
+ HDputs(" Test skipped due to hardware conversion error.");
#else
- HDputs(" Test skipped due to disabled long double.");
+ HDputs(" Test skipped due to disabled long double.");
#endif
- }
+ }
#endif /*H5_LDOUBLE_TO_UINT_ACCURATE*/
#if H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LONG);
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULONG);
#endif
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0
#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG);
#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
- {
- char str[256]; /*string */
+ {
+ char str[256]; /*string */
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "long double", "long long");
- printf("%-70s", str);
- SKIPPED();
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "long double", "long long");
+ printf("%-70s", str);
+ SKIPPED();
#if H5_SIZEOF_LONG_DOUBLE!=0
- HDputs(" Test skipped due to hardware conversion error.");
+ HDputs(" Test skipped due to hardware conversion error.");
#else
- HDputs(" Test skipped due to disabled long double.");
+ HDputs(" Test skipped due to disabled long double.");
#endif
- }
+ }
#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#if defined(H5_FP_TO_ULLONG_RIGHT_MAXIMUM) && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)
- nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG);
+ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG);
#else /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM && H5_LDOUBLE_TO_LLONG_ACCURATE*/
- {
- char str[256]; /*string */
+ {
+ char str[256]; /*string */
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "long double", "unsigned long long");
- printf("%-70s", str);
- SKIPPED();
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "long double", "unsigned long long");
+ printf("%-70s", str);
+ SKIPPED();
#if H5_SIZEOF_LONG_DOUBLE!=0
- HDputs(" Test skipped due to hardware conversion error.");
+ HDputs(" Test skipped due to hardware conversion error.");
#else
- HDputs(" Test skipped due to disabled long double.");
+ HDputs(" Test skipped due to disabled long double.");
#endif
- }
+ }
#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM && H5_LDOUBLE_TO_LLONG_ACCURATE*/
#endif
#endif
#else /*H5_LDOUBLE_TO_INTEGER_WORKS && H5_LDOUBLE_TO_INTEGER_ACCURATE*/
- {
- char str[256]; /*hello string */
+ {
+ char str[256]; /*hello string */
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "long double", "all integers");
- printf("%-70s", str);
- SKIPPED();
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "long double", "all integers");
+ printf("%-70s", str);
+ SKIPPED();
#if H5_SIZEOF_LONG_DOUBLE!=0
- HDputs(" Test skipped due to hardware conversion error.");
+ HDputs(" Test skipped due to hardware conversion error.");
#else
- HDputs(" Test skipped due to disabled long double.");
+ HDputs(" Test skipped due to disabled long double.");
#endif
- }
-#endif /*H5_LDOUBLE_TO_INTEGER_WORKS && H5_LDOUBLE_TO_INTEGER_ACCURATE*/
}
- } else {
- char str[256]; /*string */
+#endif /*H5_LDOUBLE_TO_INTEGER_WORKS && H5_LDOUBLE_TO_INTEGER_ACCURATE*/
+#ifndef H5_VMS
+ } /* end for */
+#endif /* H5_VMS */
+#else /* H5_FP_TO_INTEGER_OVERFLOW_WORKS */
+/* For Cray X1, the compiler generates floating exception when the
+ * conversion overflows. So disable all of the conversions from
+ * floating-point numbers to integers.
+ */
+ char str[256]; /*string */
- sprintf(str, "Testing %s %s -> %s conversions",
- name, "all floating-point numbers", "all integers");
- printf("%-70s", str);
- SKIPPED();
+ sprintf(str, "Testing %s %s -> %s conversions",
+ name, "all floating-point numbers", "all integers");
+ printf("%-70s", str);
+ SKIPPED();
#if H5_SIZEOF_LONG_DOUBLE!=0
- HDputs(" Test skipped due to hardware conversion error.");
+ HDputs(" Test skipped due to hardware conversion error.");
#else
- HDputs(" Test skipped due to disbaled long double.");
+ HDputs(" Test skipped due to disbaled long double.");
#endif
- }
+#endif /* H5_FP_TO_INTEGER_OVERFLOW_WORKS */
return nerrors;
}