diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dtypes.c | 11 | ||||
-rw-r--r-- | test/h5test.c | 188 |
2 files changed, 104 insertions, 95 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index 2789a51..3038d15 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -20,14 +20,14 @@ * Offset from alinged memory returned by malloc(). This can be used to test * that type conversions handle non-aligned buffers correctly. */ -#define ALIGNMENT 0 +#define ALIGNMENT 1 /* * Define if you want to test alignment code on a machine that doesn't * normally require alignment. When set, all native data types must be aligned * on a byte boundary equal to the data size. */ -#undef TEST_ALIGNMENT +#define TEST_ALIGNMENT /* Alignment test stuff */ #ifdef TEST_ALIGNMENT @@ -2828,6 +2828,11 @@ main(void) reset_hdf5(); fapl = h5_fileaccess(); + if (ALIGNMENT) { + printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", + ALIGNMENT); + } + /* Do the tests */ nerrors += test_classes()<0 ? 1 : 0; nerrors += test_copy()<0 ? 1 : 0; @@ -2836,7 +2841,7 @@ main(void) nerrors += test_named (fapl)<0 ? 1 : 0; h5_cleanup (fapl); /*must happen before first reset*/ reset_hdf5(); - + nerrors += test_conv_str_1()<0 ? 1 : 0; nerrors += test_conv_str_2()<0 ? 1 : 0; nerrors += test_conv_int ()<0 ? 1 : 0; diff --git a/test/h5test.c b/test/h5test.c index 3a08eab..59ac0b8 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -317,106 +317,110 @@ h5_fileaccess(void) void h5_no_hwconv(void) { - H5Tunregister(H5T_conv_schar_uchar); - H5Tunregister(H5T_conv_schar_short); - H5Tunregister(H5T_conv_schar_ushort); - H5Tunregister(H5T_conv_schar_int); - H5Tunregister(H5T_conv_schar_uint); - H5Tunregister(H5T_conv_schar_long); - H5Tunregister(H5T_conv_schar_ulong); - H5Tunregister(H5T_conv_schar_llong); - H5Tunregister(H5T_conv_schar_ullong); +#if 1 + H5Tunregister(H5T_PERS_HARD, NULL, -1, -1, NULL); +#else + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_ullong); - H5Tunregister(H5T_conv_uchar_schar); - H5Tunregister(H5T_conv_uchar_short); - H5Tunregister(H5T_conv_uchar_ushort); - H5Tunregister(H5T_conv_uchar_int); - H5Tunregister(H5T_conv_uchar_uint); - H5Tunregister(H5T_conv_uchar_long); - H5Tunregister(H5T_conv_uchar_ulong); - H5Tunregister(H5T_conv_uchar_llong); - H5Tunregister(H5T_conv_uchar_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_ullong); - H5Tunregister(H5T_conv_short_schar); - H5Tunregister(H5T_conv_short_uchar); - H5Tunregister(H5T_conv_short_ushort); - H5Tunregister(H5T_conv_short_int); - H5Tunregister(H5T_conv_short_uint); - H5Tunregister(H5T_conv_short_long); - H5Tunregister(H5T_conv_short_ulong); - H5Tunregister(H5T_conv_short_llong); - H5Tunregister(H5T_conv_short_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_ullong); - H5Tunregister(H5T_conv_ushort_schar); - H5Tunregister(H5T_conv_ushort_uchar); - H5Tunregister(H5T_conv_ushort_short); - H5Tunregister(H5T_conv_ushort_int); - H5Tunregister(H5T_conv_ushort_uint); - H5Tunregister(H5T_conv_ushort_long); - H5Tunregister(H5T_conv_ushort_ulong); - H5Tunregister(H5T_conv_ushort_llong); - H5Tunregister(H5T_conv_ushort_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_ullong); - H5Tunregister(H5T_conv_int_schar); - H5Tunregister(H5T_conv_int_uchar); - H5Tunregister(H5T_conv_int_short); - H5Tunregister(H5T_conv_int_ushort); - H5Tunregister(H5T_conv_int_uint); - H5Tunregister(H5T_conv_int_long); - H5Tunregister(H5T_conv_int_ulong); - H5Tunregister(H5T_conv_int_llong); - H5Tunregister(H5T_conv_int_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_ullong); - H5Tunregister(H5T_conv_uint_schar); - H5Tunregister(H5T_conv_uint_uchar); - H5Tunregister(H5T_conv_uint_short); - H5Tunregister(H5T_conv_uint_ushort); - H5Tunregister(H5T_conv_uint_int); - H5Tunregister(H5T_conv_uint_long); - H5Tunregister(H5T_conv_uint_ulong); - H5Tunregister(H5T_conv_uint_llong); - H5Tunregister(H5T_conv_uint_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_ullong); - H5Tunregister(H5T_conv_long_schar); - H5Tunregister(H5T_conv_long_uchar); - H5Tunregister(H5T_conv_long_short); - H5Tunregister(H5T_conv_long_ushort); - H5Tunregister(H5T_conv_long_int); - H5Tunregister(H5T_conv_long_uint); - H5Tunregister(H5T_conv_long_ulong); - H5Tunregister(H5T_conv_long_llong); - H5Tunregister(H5T_conv_long_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_ullong); - H5Tunregister(H5T_conv_ulong_schar); - H5Tunregister(H5T_conv_ulong_uchar); - H5Tunregister(H5T_conv_ulong_short); - H5Tunregister(H5T_conv_ulong_ushort); - H5Tunregister(H5T_conv_ulong_int); - H5Tunregister(H5T_conv_ulong_uint); - H5Tunregister(H5T_conv_ulong_long); - H5Tunregister(H5T_conv_ulong_llong); - H5Tunregister(H5T_conv_ulong_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_ullong); - H5Tunregister(H5T_conv_llong_schar); - H5Tunregister(H5T_conv_llong_uchar); - H5Tunregister(H5T_conv_llong_short); - H5Tunregister(H5T_conv_llong_ushort); - H5Tunregister(H5T_conv_llong_int); - H5Tunregister(H5T_conv_llong_uint); - H5Tunregister(H5T_conv_llong_long); - H5Tunregister(H5T_conv_llong_ulong); - H5Tunregister(H5T_conv_llong_ullong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_ullong); - H5Tunregister(H5T_conv_ullong_schar); - H5Tunregister(H5T_conv_ullong_uchar); - H5Tunregister(H5T_conv_ullong_short); - H5Tunregister(H5T_conv_ullong_ushort); - H5Tunregister(H5T_conv_ullong_int); - H5Tunregister(H5T_conv_ullong_uint); - H5Tunregister(H5T_conv_ullong_long); - H5Tunregister(H5T_conv_ullong_ulong); - H5Tunregister(H5T_conv_ullong_llong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_schar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_uchar); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_short); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_ushort); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_int); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_uint); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_long); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_ulong); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_llong); - H5Tunregister(H5T_conv_float_double); - H5Tunregister(H5T_conv_double_float); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_float_double); + H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_double_float); +#endif } |