mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
More includes cleanup
This commit is contained in:
parent
205d33f332
commit
41d541f1c2
155
test/dsets.c
155
test/dsets.c
@ -24,7 +24,6 @@
|
||||
|
||||
#define H5Z_FRIEND /*suppress error about including H5Zpkg */
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "testhdf5.h"
|
||||
#include "H5srcdir.h"
|
||||
|
||||
@ -316,7 +315,7 @@ const H5Z_class2_t H5Z_COUNT[1] = {{
|
||||
filter_count, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_count
|
||||
*
|
||||
@ -341,7 +340,7 @@ filter_count(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_create
|
||||
*
|
||||
@ -488,7 +487,7 @@ test_create(hid_t file)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_simple_io
|
||||
*
|
||||
@ -624,7 +623,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_userblock_offset
|
||||
*
|
||||
@ -730,7 +729,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_compact_io
|
||||
*
|
||||
@ -823,7 +822,7 @@ test_compact_io(hid_t fapl)
|
||||
if(H5Fclose(file) < 0) TEST_ERROR
|
||||
|
||||
/**************************************
|
||||
* Additional test for version bounds *
|
||||
* Additional test for version bounds *
|
||||
**************************************/
|
||||
|
||||
/* Create a copy of file access property list */
|
||||
@ -923,7 +922,7 @@ test_compact_io(hid_t fapl)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_max_compact
|
||||
*
|
||||
@ -1076,7 +1075,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_max_compact() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_layout_extend
|
||||
*
|
||||
@ -1199,7 +1198,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_layout_extend() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_conv_buffer
|
||||
*
|
||||
@ -1338,7 +1337,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_tconv
|
||||
*
|
||||
@ -1433,7 +1432,7 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{
|
||||
filter_bogus, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: can_apply_bogus
|
||||
*
|
||||
@ -1455,7 +1454,7 @@ can_apply_bogus(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSE
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_bogus
|
||||
*
|
||||
@ -1473,7 +1472,7 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: set_local_bogus2
|
||||
*
|
||||
@ -1519,7 +1518,7 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
|
||||
return(SUCCEED);
|
||||
} /* end set_local_bogus2() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_bogus2
|
||||
*
|
||||
@ -1573,7 +1572,7 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts,
|
||||
return(nbytes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_bogus3
|
||||
*
|
||||
@ -1602,7 +1601,7 @@ const H5Z_class2_t H5Z_CORRUPT[1] = {{
|
||||
filter_corrupt, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_corrupt
|
||||
*
|
||||
@ -1661,7 +1660,7 @@ error:
|
||||
return ret_value;
|
||||
} /* end filter_corrupt() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_cb_cont
|
||||
*
|
||||
@ -1680,7 +1679,7 @@ filter_cb_cont(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU
|
||||
return H5Z_CB_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_cb_fail
|
||||
*
|
||||
@ -1699,7 +1698,7 @@ filter_cb_fail(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU
|
||||
return H5Z_CB_CONT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_filter_internal
|
||||
*
|
||||
@ -2510,7 +2509,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_missing_filter
|
||||
*
|
||||
@ -2838,7 +2837,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_int
|
||||
*
|
||||
@ -2956,7 +2955,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_float
|
||||
*
|
||||
@ -3074,7 +3073,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_double
|
||||
*
|
||||
@ -3206,7 +3205,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_array
|
||||
*
|
||||
@ -3333,7 +3332,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_compound
|
||||
*
|
||||
@ -3550,7 +3549,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_compound_2
|
||||
*
|
||||
@ -3895,7 +3894,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_compound_3
|
||||
*
|
||||
@ -4075,7 +4074,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_int_size
|
||||
*
|
||||
@ -4242,7 +4241,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_nbit_flt_size
|
||||
*
|
||||
@ -4438,7 +4437,7 @@ test_nbit_flt_size(hid_t file)
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scaleoffset_int
|
||||
*
|
||||
@ -4550,7 +4549,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scaleoffset_int_2
|
||||
*
|
||||
@ -4678,7 +4677,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scaleoffset_float
|
||||
*
|
||||
@ -4791,7 +4790,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scaleoffset_float_2
|
||||
*
|
||||
@ -4920,7 +4919,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scaleoffset_double
|
||||
*
|
||||
@ -5033,7 +5032,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scaleoffset_double_2
|
||||
*
|
||||
@ -5163,7 +5162,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_multiopen
|
||||
*
|
||||
@ -5230,7 +5229,7 @@ test_multiopen (hid_t file)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_types
|
||||
*
|
||||
@ -5337,7 +5336,7 @@ const H5Z_class2_t H5Z_CAN_APPLY_TEST[1] = {{
|
||||
filter_bogus, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_can_apply
|
||||
*
|
||||
@ -5518,7 +5517,7 @@ const H5Z_class2_t H5Z_CAN_APPLY_TEST2[1] = {{
|
||||
filter_bogus3, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_can_apply2
|
||||
*
|
||||
@ -5667,7 +5666,7 @@ error:
|
||||
} /* end test_can_apply2() */
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_can_apply_szip
|
||||
*
|
||||
@ -5872,7 +5871,7 @@ const H5Z_class2_t H5Z_SET_LOCAL_TEST[1] = {{
|
||||
filter_bogus2, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_set_local
|
||||
*
|
||||
@ -6137,7 +6136,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_set_local() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_compare_dcpl
|
||||
*
|
||||
@ -6222,7 +6221,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_compare_dcpl() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_copy_dcpl
|
||||
*
|
||||
@ -6354,7 +6353,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_copy_dcpl() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_filter_delete
|
||||
*
|
||||
@ -6481,7 +6480,7 @@ error:
|
||||
} /* end test_filter_delete() */
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: auxread_fdata
|
||||
*
|
||||
@ -6565,7 +6564,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_filters_endianess
|
||||
*
|
||||
@ -6635,7 +6634,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_filters_endianess() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_zero_dims
|
||||
*
|
||||
@ -6799,7 +6798,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_zero_dims() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_missing_chunk
|
||||
*
|
||||
@ -6991,7 +6990,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_missing_chunk() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_random_chunks_real
|
||||
*
|
||||
@ -7359,7 +7358,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_random_chunks_real() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_random_chunks
|
||||
*
|
||||
@ -7419,7 +7418,7 @@ const H5Z_class1_t H5Z_DEPREC[1] = {{
|
||||
filter_bogus, /* The actual filter function */
|
||||
}};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_deprec
|
||||
*
|
||||
@ -7610,7 +7609,7 @@ test_deprec(hid_t file)
|
||||
} /* end test_deprec() */
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_huge_chunks
|
||||
*
|
||||
@ -7722,7 +7721,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_huge_chunks() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_chunk_cache
|
||||
*
|
||||
@ -7930,7 +7929,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_chunk_cache() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_big_chunks_bypass_cache
|
||||
*
|
||||
@ -8223,7 +8222,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_big_chunks_bypass_cache() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_chunk_fast
|
||||
*
|
||||
@ -8570,7 +8569,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_chunk_fast() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_reopen_chunk_fast
|
||||
*
|
||||
@ -8693,7 +8692,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_reopen_chunk_fast() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_chunk_fast_bug1
|
||||
*
|
||||
@ -8815,7 +8814,7 @@ const H5Z_class2_t H5Z_EXPAND[1] = {{
|
||||
/* Global "expansion factor" for filter_expand() routine */
|
||||
static size_t filter_expand_factor_g = 0;
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: filter_expand
|
||||
*
|
||||
@ -8864,7 +8863,7 @@ filter_expand(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
|
||||
return ret_value;
|
||||
} /* end filter_expand() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_chunk_expand
|
||||
*
|
||||
@ -9260,7 +9259,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_chunk_expand() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_fixed_array
|
||||
*
|
||||
@ -9679,7 +9678,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_fixed_array() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_single_chunk
|
||||
*
|
||||
@ -9943,7 +9942,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_single_chunk() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* test_idx_compatible():
|
||||
@ -10156,7 +10155,7 @@ error:
|
||||
return -1;
|
||||
} /* test_unfiltered_edge_chunks */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_large_chunk_shrink
|
||||
*
|
||||
@ -10271,7 +10270,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_large_chunk_shrink() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_zero_dim_dset
|
||||
*
|
||||
@ -10364,7 +10363,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_zero_dim_dset() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_swmr_non_latest
|
||||
*
|
||||
@ -10613,7 +10612,7 @@ error:
|
||||
return -1;
|
||||
} /* test_swmr_non_latest() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_earray_hdr_fd
|
||||
*
|
||||
@ -10733,7 +10732,7 @@ error:
|
||||
return -1;
|
||||
} /* test_earray_hdr_fd() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_farray_hdr_fd
|
||||
*
|
||||
@ -10853,7 +10852,7 @@ error:
|
||||
return -1;
|
||||
} /* test_farray_hdr_fd() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_bt2_hdr_fd
|
||||
*
|
||||
@ -10973,7 +10972,7 @@ error:
|
||||
return -1;
|
||||
} /* test_bt2_hdr_fd() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_storage_size
|
||||
*
|
||||
@ -11367,7 +11366,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_storage_size() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_power2up
|
||||
*
|
||||
@ -11458,7 +11457,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_power2up() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scatter
|
||||
*
|
||||
@ -11776,7 +11775,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_scatter() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_gather
|
||||
*
|
||||
@ -12138,7 +12137,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_gather() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_scatter_error
|
||||
*
|
||||
@ -12341,7 +12340,7 @@ error:
|
||||
return -1;
|
||||
} /* end test_scatter_error() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_gather_error
|
||||
*
|
||||
@ -12868,7 +12867,7 @@ error:
|
||||
return -1;
|
||||
} /* test_compact_open_close_dirty() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_versionbounds
|
||||
*
|
||||
@ -12940,7 +12939,7 @@ test_versionbounds()
|
||||
|
||||
/* Loop through all the combinations of low/high library format bounds */
|
||||
/* Create a source file and a dataset in it. Create a virtual file and
|
||||
virtual dataset. Creation of virtual dataset should only succeed in
|
||||
virtual dataset. Creation of virtual dataset should only succeed in
|
||||
H5F_LIBVER_V110 */
|
||||
for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
|
||||
for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
|
||||
@ -13021,7 +13020,7 @@ test_versionbounds()
|
||||
return -1;
|
||||
} /* test_versionbounds() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: main
|
||||
*
|
||||
|
1611
test/objcopy.c
1611
test/objcopy.c
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: tarray
|
||||
* Test program: tarray
|
||||
*
|
||||
* Test the Array Datatype functionality
|
||||
*
|
||||
@ -22,13 +22,11 @@
|
||||
#include "testhdf5.h"
|
||||
#include "H5srcdir.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
|
||||
#define FILENAME "tarray1.h5"
|
||||
#define TESTFILE "tarrold.h5"
|
||||
|
||||
/* 1-D array datatype */
|
||||
#define ARRAY1_RANK 1
|
||||
#define ARRAY1_RANK 1
|
||||
#define ARRAY1_DIM1 4
|
||||
|
||||
/* 3-D array datatype */
|
||||
@ -67,7 +65,7 @@ typedef struct
|
||||
void *test_array_alloc_custom(size_t size, void *info);
|
||||
void test_array_free_custom(void *mem, void *info);
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_atomic_1d
|
||||
*
|
||||
@ -191,7 +189,7 @@ test_array_atomic_1d(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
} /* end test_array_atomic_1d() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_funcs
|
||||
*
|
||||
@ -254,7 +252,7 @@ test_array_funcs(void)
|
||||
CHECK(ret, FAIL, "H5Tclose");
|
||||
} /* end test_array_funcs() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_atomic_3d
|
||||
*
|
||||
@ -383,7 +381,7 @@ test_array_atomic_3d(void)
|
||||
|
||||
} /* end test_array_atomic_3d() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_array_atomic
|
||||
*
|
||||
@ -542,7 +540,7 @@ test_array_array_atomic(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
} /* end test_array_array_atomic() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_compound_atomic
|
||||
*
|
||||
@ -749,7 +747,7 @@ test_array_compound_atomic(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
} /* end test_array_compound_atomic() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_compound_array
|
||||
*
|
||||
@ -1008,7 +1006,7 @@ test_array_compound_array(void)
|
||||
** allocated.
|
||||
**
|
||||
****************************************************************/
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_alloc_custom
|
||||
*
|
||||
@ -1047,7 +1045,7 @@ test_array_alloc_custom(size_t size, void *info)
|
||||
return ret_value;
|
||||
} /* end test_array_alloc_custom() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_free_custom
|
||||
*
|
||||
@ -1083,7 +1081,7 @@ test_array_free_custom(void *_mem, void *info)
|
||||
return;
|
||||
} /* end test_array_free_custom() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_vlen_atomic
|
||||
*
|
||||
@ -1298,7 +1296,7 @@ test_array_vlen_atomic(void)
|
||||
|
||||
} /* end test_array_vlen_atomic() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_vlen_array
|
||||
*
|
||||
@ -1553,7 +1551,7 @@ test_array_vlen_array(void)
|
||||
|
||||
} /* end test_array_vlen_array() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array_bkg
|
||||
*
|
||||
@ -1582,9 +1580,9 @@ test_array_bkg(void)
|
||||
unsigned ndims[3] = {1,1,1};
|
||||
|
||||
typedef struct {
|
||||
int a[ALEN];
|
||||
float b[ALEN];
|
||||
double c[ALEN];
|
||||
int a[ALEN];
|
||||
float b[ALEN];
|
||||
double c[ALEN];
|
||||
} CmpField;
|
||||
|
||||
CmpField cf[LENGTH];
|
||||
@ -1857,7 +1855,7 @@ test_array_bkg(void)
|
||||
HDfree(dtsinfo);
|
||||
} /* end test_array_bkg() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_compat
|
||||
*
|
||||
@ -2152,7 +2150,7 @@ test_compat(void)
|
||||
|
||||
} /* end test_compat() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_array
|
||||
*
|
||||
@ -2185,7 +2183,7 @@ test_array(void)
|
||||
|
||||
} /* end test_array() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_array
|
||||
*
|
||||
|
@ -19,7 +19,6 @@
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "testhdf5.h"
|
||||
|
||||
/* macros definitions */
|
||||
@ -40,22 +39,22 @@
|
||||
/* Needs this extra step so that we can print the macro name. */
|
||||
#define vrfy_macrosize(type, macro, macroname) \
|
||||
if (sizeof(type) != macro) \
|
||||
TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \
|
||||
#type, sizeof(type), macroname, (int)macro);
|
||||
TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \
|
||||
#type, sizeof(type), macroname, (int)macro);
|
||||
|
||||
/* local routine prototypes */
|
||||
void test_config_ctypes(void);
|
||||
void test_exit_definitions(void);
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_configure
|
||||
* Function: test_configure
|
||||
*
|
||||
* Purpose: Main configure definitions testing routine
|
||||
* Purpose: Main configure definitions testing routine
|
||||
*
|
||||
* Return: none (error is fed back via global variable num_errs)
|
||||
* Return: none (error is fed back via global variable num_errs)
|
||||
*
|
||||
* Programmer: Albert Cheng
|
||||
* Programmer: Albert Cheng
|
||||
* September 25, 2001
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@ -69,15 +68,15 @@ test_configure(void)
|
||||
test_exit_definitions();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_configure
|
||||
* Function: cleanup_configure
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Albert Cheng
|
||||
* Programmer: Albert Cheng
|
||||
* September 25, 2001
|
||||
*
|
||||
* Modifications:
|
||||
@ -90,20 +89,20 @@ cleanup_configure(void)
|
||||
/* no file to clean */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_config_ctypes
|
||||
* Function: test_config_ctypes
|
||||
*
|
||||
* Purpose: test C language data type sizes
|
||||
* Purpose: test C language data type sizes
|
||||
*
|
||||
* Return: none (error is fed back via global variable num_errs)
|
||||
* Return: none (error is fed back via global variable num_errs)
|
||||
*
|
||||
* Programmer: Albert Cheng
|
||||
* Programmer: Albert Cheng
|
||||
* September 25, 2001
|
||||
*
|
||||
* Modifications:
|
||||
* Albert Cheng, 2004/10/14
|
||||
* Verified both signed and unsigned int types.
|
||||
* Albert Cheng, 2004/10/14
|
||||
* Verified both signed and unsigned int types.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -201,15 +200,15 @@ test_config_ctypes(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_exit_definitions
|
||||
* Function: test_exit_definitions
|
||||
*
|
||||
* Purpose: test the exit macros values
|
||||
* Purpose: test the exit macros values
|
||||
*
|
||||
* Return: none (error is fed back via global variable num_errs)
|
||||
* Return: none (error is fed back via global variable num_errs)
|
||||
*
|
||||
* Programmer: Albert Cheng
|
||||
* Programmer: Albert Cheng
|
||||
* October 12, 2009
|
||||
*
|
||||
* Modifications:
|
||||
@ -222,9 +221,9 @@ test_exit_definitions(void)
|
||||
/* Verify the EXIT_SUCCESS and EXIT_FAILURE are 0 and 1 respectively. */
|
||||
/* This should be true for POSIX compliant systems. */
|
||||
if (EXIT_SUCCESS != 0) \
|
||||
TestErrPrintf("Error: EXIT_SUCCESS is %d, should be %d\n", \
|
||||
EXIT_SUCCESS, 0);
|
||||
TestErrPrintf("Error: EXIT_SUCCESS is %d, should be %d\n", \
|
||||
EXIT_SUCCESS, 0);
|
||||
if (EXIT_FAILURE != 1) \
|
||||
TestErrPrintf("Error: EXIT_FAILURE is %d, should be %d\n", \
|
||||
EXIT_FAILURE, 1);
|
||||
TestErrPrintf("Error: EXIT_FAILURE is %d, should be %d\n", \
|
||||
EXIT_FAILURE, 1);
|
||||
}
|
||||
|
817
test/tfile.c
817
test/tfile.c
File diff suppressed because it is too large
Load Diff
154
test/tgenprop.c
154
test/tgenprop.c
@ -13,21 +13,21 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: tgenprop
|
||||
* Test program: tgenprop
|
||||
*
|
||||
* Test the Generic Property functionality
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#define H5P_FRIEND /*suppress error about including H5Ppkg */
|
||||
#define H5P_FRIEND /*suppress error about including H5Ppkg */
|
||||
|
||||
/* Define this macro to indicate that the testing APIs should be available */
|
||||
#define H5P_TESTING
|
||||
|
||||
#include "testhdf5.h"
|
||||
#include "hdf5.h"
|
||||
|
||||
#include "H5Dprivate.h" /* For Dataset creation property list names */
|
||||
#include "H5Ppkg.h" /* Generic Properties */
|
||||
#include "H5Ppkg.h" /* Generic Properties */
|
||||
|
||||
#define FILENAME "tgenprop.h5"
|
||||
|
||||
@ -80,11 +80,11 @@ typedef struct count_data_t {
|
||||
static void
|
||||
test_genprop_basic_class(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t cid3; /* Generic Property class ID */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t cid3; /* Generic Property class ID */
|
||||
char *name; /* Name of class */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Creation Functionality\n"));
|
||||
@ -169,10 +169,10 @@ test_genprop_basic_class(void)
|
||||
static void
|
||||
test_genprop_basic_class_prop(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t size; /* Size of property */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
herr_t ret; /* Generic return value */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t size; /* Size of property */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Properties Functionality\n"));
|
||||
@ -311,8 +311,8 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name,
|
||||
static void
|
||||
test_genprop_class_iter(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
int idx; /* Index to start iteration at */
|
||||
struct { /* Struct for iterations */
|
||||
int iter_count;
|
||||
@ -323,7 +323,7 @@ test_genprop_class_iter(void)
|
||||
PROP2_NAME,
|
||||
PROP3_NAME,
|
||||
PROP4_NAME};
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Property Iteration Functionality\n"));
|
||||
@ -417,17 +417,17 @@ test_genprop_cls_cls_cb1(hid_t list_id, void *create_data)
|
||||
static void
|
||||
test_genprop_class_callback(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
hid_t lid2; /* Generic Property list ID */
|
||||
hid_t lid3; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
hid_t lid2; /* Generic Property list ID */
|
||||
hid_t lid3; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
struct { /* Struct for callbacks */
|
||||
int count;
|
||||
hid_t id;
|
||||
} crt_cb_struct, cpy_cb_struct, cls_cb_struct;
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Callback Functionality\n"));
|
||||
@ -596,14 +596,14 @@ test_genprop_class_callback(void)
|
||||
static void
|
||||
test_genprop_basic_list(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties */
|
||||
size_t size; /* Size of property */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties */
|
||||
size_t size; /* Size of property */
|
||||
int prop1_value; /* Value for property #1 */
|
||||
float prop2_value; /* Value for property #2 */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Creation Functionality\n"));
|
||||
@ -678,8 +678,8 @@ test_genprop_basic_list(void)
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
|
||||
|
||||
|
||||
/* Close list */
|
||||
@ -702,14 +702,14 @@ test_genprop_basic_list(void)
|
||||
static void
|
||||
test_genprop_basic_list_prop(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties */
|
||||
int prop1_value; /* Value for property #1 */
|
||||
float prop2_value; /* Value for property #2 */
|
||||
char prop3_value[10];/* Property #3 value */
|
||||
double prop4_value; /* Property #4 value */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Property Functionality\n"));
|
||||
@ -770,8 +770,8 @@ test_genprop_basic_list_prop(void)
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
|
||||
|
||||
|
||||
/* Check values of temporary properties (set with regular values) */
|
||||
@ -783,8 +783,8 @@ test_genprop_basic_list_prop(void)
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
|
||||
/* Delete permanent property */
|
||||
ret = H5Premove(lid1, PROP2_NAME);
|
||||
@ -820,8 +820,8 @@ test_genprop_basic_list_prop(void)
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
|
||||
/* Close list */
|
||||
ret = H5Pclose(lid1);
|
||||
@ -856,9 +856,9 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name,
|
||||
static void
|
||||
test_genprop_list_iter(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
size_t nprops; /* Number of properties */
|
||||
int idx; /* Index to start iteration at */
|
||||
struct { /* Struct for iterations */
|
||||
int iter_count;
|
||||
@ -870,7 +870,7 @@ test_genprop_list_iter(void)
|
||||
PROP1_NAME,
|
||||
PROP2_NAME
|
||||
};
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Generic Property List Iteration Functionality\n"));
|
||||
@ -1144,10 +1144,10 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
|
||||
static void
|
||||
test_genprop_list_callback(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
hid_t lid2; /* 2nd Generic Property list ID */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
hid_t lid2; /* 2nd Generic Property list ID */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
int prop1_value; /* Value for property #1 */
|
||||
int prop1_new_value=20; /* Property #1 new value */
|
||||
float prop2_value; /* Value for property #2 */
|
||||
@ -1158,7 +1158,7 @@ test_genprop_list_callback(void)
|
||||
int count;
|
||||
hid_t id;
|
||||
} cop_cb_struct;
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Property Callback Functionality\n"));
|
||||
@ -1225,8 +1225,8 @@ test_genprop_list_callback(void)
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
|
||||
|
||||
/* Check values of temporary properties (set with regular values) */
|
||||
ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
|
||||
@ -1240,8 +1240,8 @@ test_genprop_list_callback(void)
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
|
||||
/* Verify get callback information for properties tracked */
|
||||
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
|
||||
@ -1373,7 +1373,7 @@ test_genprop_list_addprop(void)
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t pid; /* Property List ID */
|
||||
int prop1_value; /* Value for property #1 */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Create file */
|
||||
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
@ -1448,7 +1448,7 @@ test_genprop_class_addprop(void)
|
||||
hid_t cid; /* Property Class ID */
|
||||
hid_t pid; /* Property List ID */
|
||||
int prop1_value; /* Value for property #1 */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Create file */
|
||||
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
@ -1570,7 +1570,7 @@ static void
|
||||
test_genprop_list_add_remove_prop(void)
|
||||
{
|
||||
hid_t pid; /* Property List ID */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Create a dataset creation property list */
|
||||
pid = H5Pcreate(H5P_DATASET_CREATE);
|
||||
@ -1607,11 +1607,11 @@ test_genprop_list_add_remove_prop(void)
|
||||
static void
|
||||
test_genprop_equal(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
hid_t lid2; /* Generic Property list ID */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property list ID */
|
||||
hid_t lid2; /* Generic Property list ID */
|
||||
int prop1_new_value = 20; /* Property #1 new value */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Equal Functionality\n"));
|
||||
@ -1756,11 +1756,11 @@ test_genprop_equal(void)
|
||||
static void
|
||||
test_genprop_path(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t cid3; /* Generic Property class ID */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t cid2; /* Generic Property class ID */
|
||||
hid_t cid3; /* Generic Property class ID */
|
||||
char *path; /* Class path */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Generic Property List Class Path Functionality\n"));
|
||||
@ -1828,10 +1828,10 @@ test_genprop_path(void)
|
||||
static void
|
||||
test_genprop_refcount(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property class ID */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
hid_t lid1; /* Generic Property class ID */
|
||||
char *name; /* Name of class */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Generic Property List Reference Count Functionality\n"));
|
||||
@ -1901,10 +1901,10 @@ test_genprop_refcount(void)
|
||||
static void
|
||||
test_genprop_deprec_class(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t size; /* Size of property */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
herr_t ret; /* Generic return value */
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t size; /* Size of property */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Deprecated Generic Property List Functions\n"));
|
||||
@ -2034,7 +2034,7 @@ test_genprop_deprec_list(void)
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t pid; /* Property List ID */
|
||||
int prop1_value; /* Value for property #1 */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Create file */
|
||||
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
@ -2130,15 +2130,15 @@ test_genprop(void)
|
||||
|
||||
} /* test_genprop() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_genprop
|
||||
* Function: cleanup_genprop
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Programmer: Quincey Koziol
|
||||
* June 8, 1999
|
||||
*
|
||||
* Modifications:
|
||||
|
255
test/tid.c
255
test/tid.c
@ -14,10 +14,9 @@
|
||||
/* Test user-created identifiers (hid_t's) and identifier types. */
|
||||
|
||||
#include "testhdf5.h"
|
||||
#include "hdf5.h"
|
||||
|
||||
/* Include H5Ipkg.h to calculate max number of groups */
|
||||
#define H5I_FRIEND /*suppress error about including H5Ipkg */
|
||||
#define H5I_FRIEND /*suppress error about including H5Ipkg */
|
||||
#include "H5Ipkg.h"
|
||||
|
||||
/* Test basic functionality of registering and deleting types and IDs */
|
||||
@ -238,97 +237,97 @@ out:
|
||||
}
|
||||
|
||||
|
||||
/* A dummy search function for the next test */
|
||||
/* A dummy search function for the next test */
|
||||
static int test_search_func(void H5_ATTR_UNUSED * ptr1, void H5_ATTR_UNUSED * ptr2) { return 0; }
|
||||
|
||||
/* Ensure that public functions cannot access "predefined" ID types */
|
||||
/* Ensure that public functions cannot access "predefined" ID types */
|
||||
static int id_predefined_test(void )
|
||||
{
|
||||
void * testObj;
|
||||
hid_t testID;
|
||||
hid_t typeID = H5I_INVALID_HID;
|
||||
void * testPtr;
|
||||
herr_t testErr;
|
||||
void * testObj;
|
||||
hid_t testID;
|
||||
hid_t typeID = H5I_INVALID_HID;
|
||||
void * testPtr;
|
||||
herr_t testErr;
|
||||
|
||||
testObj = HDmalloc(sizeof(int));
|
||||
testObj = HDmalloc(sizeof(int));
|
||||
|
||||
/* Try to perform illegal functions on various predefined types */
|
||||
H5E_BEGIN_TRY
|
||||
testID = H5Iregister(H5I_FILE, testObj);
|
||||
H5E_END_TRY
|
||||
/* Try to perform illegal functions on various predefined types */
|
||||
H5E_BEGIN_TRY
|
||||
testID = H5Iregister(H5I_FILE, testObj);
|
||||
H5E_END_TRY
|
||||
|
||||
VERIFY(testID, H5I_INVALID_HID, "H5Iregister");
|
||||
if(testID != H5I_INVALID_HID)
|
||||
goto out;
|
||||
VERIFY(testID, H5I_INVALID_HID, "H5Iregister");
|
||||
if(testID != H5I_INVALID_HID)
|
||||
goto out;
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj);
|
||||
H5E_END_TRY
|
||||
H5E_BEGIN_TRY
|
||||
testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj);
|
||||
H5E_END_TRY
|
||||
|
||||
CHECK_PTR_NULL(testPtr, "H5Isearch");
|
||||
if(testPtr != NULL)
|
||||
goto out;
|
||||
CHECK_PTR_NULL(testPtr, "H5Isearch");
|
||||
if(testPtr != NULL)
|
||||
goto out;
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
testErr = H5Inmembers(H5I_ERROR_STACK, NULL);
|
||||
H5E_END_TRY
|
||||
H5E_BEGIN_TRY
|
||||
testErr = H5Inmembers(H5I_ERROR_STACK, NULL);
|
||||
H5E_END_TRY
|
||||
|
||||
VERIFY(testErr, -1, "H5Inmembers");
|
||||
if(testErr != -1)
|
||||
goto out;
|
||||
VERIFY(testErr, -1, "H5Inmembers");
|
||||
if(testErr != -1)
|
||||
goto out;
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
testErr = H5Iclear_type(H5I_FILE, 0);
|
||||
H5E_END_TRY
|
||||
H5E_BEGIN_TRY
|
||||
testErr = H5Iclear_type(H5I_FILE, 0);
|
||||
H5E_END_TRY
|
||||
|
||||
VERIFY((testErr >= 0), 0, "H5Iclear_type");
|
||||
if(testErr >= 0)
|
||||
goto out;
|
||||
VERIFY((testErr >= 0), 0, "H5Iclear_type");
|
||||
if(testErr >= 0)
|
||||
goto out;
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
testErr = H5Idestroy_type(H5I_DATASET);
|
||||
H5E_END_TRY
|
||||
H5E_BEGIN_TRY
|
||||
testErr = H5Idestroy_type(H5I_DATASET);
|
||||
H5E_END_TRY
|
||||
|
||||
VERIFY((testErr >= 0), 0, "H5Idestroy_type");
|
||||
if(testErr >= 0)
|
||||
goto out;
|
||||
VERIFY((testErr >= 0), 0, "H5Idestroy_type");
|
||||
if(testErr >= 0)
|
||||
goto out;
|
||||
|
||||
/* Create a datatype ID and try to perform illegal functions on it */
|
||||
typeID = H5Tcreate(H5T_OPAQUE, (size_t)42);
|
||||
CHECK(typeID, H5I_INVALID_HID, "H5Tcreate");
|
||||
if(typeID == H5I_INVALID_HID)
|
||||
goto out;
|
||||
/* Create a datatype ID and try to perform illegal functions on it */
|
||||
typeID = H5Tcreate(H5T_OPAQUE, (size_t)42);
|
||||
CHECK(typeID, H5I_INVALID_HID, "H5Tcreate");
|
||||
if(typeID == H5I_INVALID_HID)
|
||||
goto out;
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
testPtr = H5Iremove_verify(typeID, H5I_DATATYPE);
|
||||
H5E_END_TRY
|
||||
H5E_BEGIN_TRY
|
||||
testPtr = H5Iremove_verify(typeID, H5I_DATATYPE);
|
||||
H5E_END_TRY
|
||||
|
||||
CHECK_PTR_NULL(testPtr, "H5Iremove_verify");
|
||||
if(testPtr != NULL)
|
||||
goto out;
|
||||
CHECK_PTR_NULL(testPtr, "H5Iremove_verify");
|
||||
if(testPtr != NULL)
|
||||
goto out;
|
||||
|
||||
H5E_BEGIN_TRY
|
||||
testPtr = H5Iobject_verify(typeID, H5I_DATATYPE);
|
||||
H5E_END_TRY
|
||||
H5E_BEGIN_TRY
|
||||
testPtr = H5Iobject_verify(typeID, H5I_DATATYPE);
|
||||
H5E_END_TRY
|
||||
|
||||
CHECK_PTR_NULL(testPtr, "H5Iobject_verify");
|
||||
if(testPtr != NULL)
|
||||
goto out;
|
||||
CHECK_PTR_NULL(testPtr, "H5Iobject_verify");
|
||||
if(testPtr != NULL)
|
||||
goto out;
|
||||
|
||||
H5Tclose(typeID);
|
||||
H5Tclose(typeID);
|
||||
|
||||
/* testObj was never registered as an atom, so it will not be
|
||||
/* testObj was never registered as an atom, so it will not be
|
||||
* automatically freed. */
|
||||
HDfree(testObj);
|
||||
return 0;
|
||||
HDfree(testObj);
|
||||
return 0;
|
||||
|
||||
out:
|
||||
if(typeID != H5I_INVALID_HID)
|
||||
H5Tclose(typeID);
|
||||
if(typeID != H5I_INVALID_HID)
|
||||
H5Tclose(typeID);
|
||||
if(testObj != NULL)
|
||||
HDfree(testObj);
|
||||
HDfree(testObj);
|
||||
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -444,12 +443,12 @@ static int test_get_type(void)
|
||||
|
||||
out:
|
||||
if(dtype != H5I_INVALID_HID)
|
||||
H5Tclose(dtype);
|
||||
H5Tclose(dtype);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Test boundary cases with lots of types */
|
||||
/* Test boundary cases with lots of types */
|
||||
|
||||
/* Type IDs range from H5I_NTYPES to H5I_MAX_NUM_TYPES. The system will assign */
|
||||
/* IDs in sequential order until H5I_MAX_NUM_TYPES IDs have been given out, at which */
|
||||
@ -459,78 +458,78 @@ out:
|
||||
/* to low values successfully, ensure that an error is thrown when all possible */
|
||||
/* type IDs are taken, then ensure that deleting types frees up their IDs. */
|
||||
/* Note that this test depends on the implementation of IDs, so may break */
|
||||
/* if the implementation changes. */
|
||||
/* if the implementation changes. */
|
||||
/* Also note that if someone else registered a user-defined type and forgot to */
|
||||
/* destroy it, this test will mysteriously fail (because it will expect there to */
|
||||
/* be one more "free" type ID than there is). */
|
||||
/* H5I_NTYPES is defined in h5public.h, H5I_MAX_NUM_TYPES is defined in h5pkg.h */
|
||||
static int test_id_type_list(void)
|
||||
{
|
||||
H5I_type_t startType; /* The first type ID we were assigned in this test */
|
||||
H5I_type_t currentType;
|
||||
H5I_type_t testType;
|
||||
int i; /* Just a counter variable */
|
||||
H5I_type_t startType; /* The first type ID we were assigned in this test */
|
||||
H5I_type_t currentType;
|
||||
H5I_type_t testType;
|
||||
int i; /* Just a counter variable */
|
||||
|
||||
startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
CHECK(startType, H5I_BADID, "H5Iregister_type");
|
||||
if(startType == H5I_BADID)
|
||||
goto out;
|
||||
startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
CHECK(startType, H5I_BADID, "H5Iregister_type");
|
||||
if(startType == H5I_BADID)
|
||||
goto out;
|
||||
|
||||
/* Sanity check */
|
||||
if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES)
|
||||
{
|
||||
/* Error condition, throw an error */
|
||||
CHECK(1, 1, "H5Iregister_type");
|
||||
goto out;
|
||||
}
|
||||
/* Create types up to H5I_MAX_NUM_TYPES */
|
||||
for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++)
|
||||
{
|
||||
currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
CHECK(currentType, H5I_BADID, "H5Iregister_type");
|
||||
if(currentType == H5I_BADID)
|
||||
goto out;
|
||||
}
|
||||
/* Sanity check */
|
||||
if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES)
|
||||
{
|
||||
/* Error condition, throw an error */
|
||||
CHECK(1, 1, "H5Iregister_type");
|
||||
goto out;
|
||||
}
|
||||
/* Create types up to H5I_MAX_NUM_TYPES */
|
||||
for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++)
|
||||
{
|
||||
currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
CHECK(currentType, H5I_BADID, "H5Iregister_type");
|
||||
if(currentType == H5I_BADID)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Wrap around to low type ID numbers */
|
||||
for(i = H5I_NTYPES; i < startType; i++)
|
||||
{
|
||||
currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
CHECK(currentType, H5I_BADID, "H5Iregister_type");
|
||||
if(currentType == H5I_BADID)
|
||||
goto out;
|
||||
}
|
||||
/* Wrap around to low type ID numbers */
|
||||
for(i = H5I_NTYPES; i < startType; i++)
|
||||
{
|
||||
currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
CHECK(currentType, H5I_BADID, "H5Iregister_type");
|
||||
if(currentType == H5I_BADID)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* There should be no room at the inn for a new ID type*/
|
||||
H5E_BEGIN_TRY
|
||||
testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
H5E_END_TRY
|
||||
/* There should be no room at the inn for a new ID type*/
|
||||
H5E_BEGIN_TRY
|
||||
testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
H5E_END_TRY
|
||||
|
||||
VERIFY(testType, H5I_BADID, "H5Iregister_type");
|
||||
if(testType != H5I_BADID)
|
||||
goto out;
|
||||
VERIFY(testType, H5I_BADID, "H5Iregister_type");
|
||||
if(testType != H5I_BADID)
|
||||
goto out;
|
||||
|
||||
/* Now delete a type and try to insert again */
|
||||
H5Idestroy_type(H5I_NTYPES);
|
||||
testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
/* Now delete a type and try to insert again */
|
||||
H5Idestroy_type(H5I_NTYPES);
|
||||
testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
|
||||
|
||||
VERIFY(testType, H5I_NTYPES, "H5Iregister_type");
|
||||
if(testType != H5I_NTYPES)
|
||||
goto out;
|
||||
VERIFY(testType, H5I_NTYPES, "H5Iregister_type");
|
||||
if(testType != H5I_NTYPES)
|
||||
goto out;
|
||||
|
||||
/* Cleanup. Destroy all types. */
|
||||
for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
|
||||
H5Idestroy_type((H5I_type_t) i);
|
||||
/* Cleanup. Destroy all types. */
|
||||
for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
|
||||
H5Idestroy_type((H5I_type_t) i);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
out:
|
||||
/* Cleanup. For simplicity, just destroy all types and ignore errors. */
|
||||
H5E_BEGIN_TRY
|
||||
for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
|
||||
H5Idestroy_type((H5I_type_t) i);
|
||||
H5E_END_TRY
|
||||
return -1;
|
||||
H5E_BEGIN_TRY
|
||||
for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
|
||||
H5Idestroy_type((H5I_type_t) i);
|
||||
H5E_END_TRY
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Test removing ids in callback for H5Iclear_type */
|
||||
@ -733,11 +732,11 @@ void test_ids(void)
|
||||
/* Set the random # seed */
|
||||
HDsrandom((unsigned)HDtime(NULL));
|
||||
|
||||
if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n");
|
||||
if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n");
|
||||
if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n");
|
||||
if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n");
|
||||
if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n");
|
||||
if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n");
|
||||
if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n");
|
||||
if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n");
|
||||
if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n");
|
||||
if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n");
|
||||
if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n");
|
||||
if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n");
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: titerate
|
||||
* Test program: titerate
|
||||
*
|
||||
* Test the Group & Attribute functionality
|
||||
*
|
||||
@ -21,8 +21,6 @@
|
||||
|
||||
#include "testhdf5.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
|
||||
#define DATAFILE "titerate.h5"
|
||||
|
||||
/* Number of datasets for group iteration test */
|
||||
@ -38,8 +36,8 @@
|
||||
#define NAMELEN 80
|
||||
|
||||
/* 1-D dataset with fixed dimensions */
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
|
||||
typedef enum {
|
||||
RET_ZERO,
|
||||
@ -131,7 +129,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
|
||||
char dataset_name[NAMELEN]; /* dataset name */
|
||||
iter_info info; /* Custom iteration information */
|
||||
H5G_info_t ginfo; /* Buffer for querying object's info */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Group Iteration Functionality\n"));
|
||||
@ -390,7 +388,7 @@ static void test_iter_attr(hid_t fapl, hbool_t new_format)
|
||||
char name[NAMELEN]; /* temporary name buffer */
|
||||
char *anames[NATTR]; /* Names of the attributes created */
|
||||
iter_info info; /* Custom iteration information */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Attribute Iteration Functionality\n"));
|
||||
@ -545,7 +543,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_
|
||||
{
|
||||
const iter_info *test_info = (const iter_info *)opdata;
|
||||
H5O_info_t oinfo;
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
if(HDstrcmp(name, test_info->name)) {
|
||||
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
|
||||
@ -575,13 +573,13 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_
|
||||
static void
|
||||
test_iter_group_large(hid_t fapl)
|
||||
{
|
||||
hid_t file; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t group; /* Group ID */
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t tid; /* Datatype ID */
|
||||
hsize_t dims[] = {SPACE1_DIM1};
|
||||
herr_t ret; /* Generic return value */
|
||||
hid_t file; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t group; /* Group ID */
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t tid; /* Datatype ID */
|
||||
hsize_t dims[] = {SPACE1_DIM1};
|
||||
herr_t ret; /* Generic return value */
|
||||
char gname[20]; /* Temporary group name */
|
||||
iter_info *names; /* Names of objects in the root group */
|
||||
iter_info *curr_name; /* Pointer to the current name in the root group */
|
||||
@ -711,7 +709,7 @@ static void test_grp_memb_funcs(hid_t fapl)
|
||||
char dataset_name[NAMELEN]; /* dataset name */
|
||||
ssize_t name_len; /* Length of object's name */
|
||||
H5G_info_t ginfo; /* Buffer for querying object's info */
|
||||
herr_t ret = SUCCEED; /* Generic return value */
|
||||
herr_t ret = SUCCEED; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Group Member Information Functionality\n"));
|
||||
@ -851,7 +849,7 @@ static void test_links(hid_t fapl)
|
||||
hid_t gid, gid1;
|
||||
H5G_info_t ginfo; /* Buffer for querying object's info */
|
||||
hsize_t i;
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Soft and Hard Link Iteration Functionality\n"));
|
||||
@ -927,7 +925,7 @@ test_iterate(void)
|
||||
{
|
||||
hid_t fapl, fapl2; /* File access property lists */
|
||||
unsigned new_format; /* Whether to use the new format or not */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Iteration Operations\n"));
|
||||
@ -960,15 +958,15 @@ test_iterate(void)
|
||||
CHECK(ret, FAIL, "H5Pclose");
|
||||
} /* test_iterate() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_iterate
|
||||
* Function: cleanup_iterate
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Programmer: Quincey Koziol
|
||||
* April 5, 2000
|
||||
*
|
||||
* Modifications:
|
||||
|
103
test/tmisc.c
103
test/tmisc.c
@ -21,12 +21,11 @@
|
||||
*
|
||||
*************************************************************/
|
||||
|
||||
#define H5D_FRIEND /*suppress error about including H5Dpkg */
|
||||
#define H5D_FRIEND /*suppress error about including H5Dpkg */
|
||||
|
||||
/* Define this macro to indicate that the testing APIs should be available */
|
||||
#define H5D_TESTING
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "testhdf5.h"
|
||||
#include "H5srcdir.h"
|
||||
#include "H5Dpkg.h" /* Datasets */
|
||||
@ -1816,11 +1815,11 @@ test_misc11(void)
|
||||
unsigned sym_ik; /* Symbol table B-tree initial 'K' value */
|
||||
unsigned istore_ik; /* Indexed storage B-tree initial 'K' value */
|
||||
unsigned sym_lk; /* Symbol table B-tree leaf 'K' value */
|
||||
unsigned nindexes; /* Shared message number of indexes */
|
||||
unsigned nindexes; /* Shared message number of indexes */
|
||||
H5F_info2_t finfo; /* global information about file */
|
||||
H5F_fspace_strategy_t strategy; /* File space strategy */
|
||||
hsize_t threshold; /* Free-space section threshold */
|
||||
hbool_t persist; /* To persist free-space or not */
|
||||
hsize_t threshold; /* Free-space section threshold */
|
||||
hbool_t persist; /* To persist free-space or not */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
@ -1859,7 +1858,7 @@ test_misc11(void)
|
||||
|
||||
/* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
|
||||
H5E_BEGIN_TRY {
|
||||
ret=H5Pset_sym_k(fcpl, 32770, 0);
|
||||
ret=H5Pset_sym_k(fcpl, 32770, 0);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(ret, FAIL, "H5Pset_sym_k");
|
||||
|
||||
@ -1868,7 +1867,7 @@ test_misc11(void)
|
||||
|
||||
/* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
|
||||
H5E_BEGIN_TRY {
|
||||
ret=H5Pset_istore_k(fcpl, 32770);
|
||||
ret=H5Pset_istore_k(fcpl, 32770);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(ret, FAIL, "H5Pset_istore_k");
|
||||
|
||||
@ -1980,19 +1979,19 @@ test_misc12(void)
|
||||
"las palabras del que murio en la cruz."
|
||||
};
|
||||
char *rdata [MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE]; /* Information read in */
|
||||
hid_t fid1;
|
||||
hid_t dataset;
|
||||
hid_t sid1, space, memspace;
|
||||
hid_t tid1, cparms;
|
||||
hsize_t dims1[] = {MISC12_SPACE1_DIM1};
|
||||
hsize_t dimsn[] = {MISC12_APPEND_SIZE};
|
||||
hsize_t maxdims1[1] = {H5S_UNLIMITED};
|
||||
hsize_t chkdims1[1] = {MISC12_CHUNK_SIZE};
|
||||
hid_t fid1;
|
||||
hid_t dataset;
|
||||
hid_t sid1, space, memspace;
|
||||
hid_t tid1, cparms;
|
||||
hsize_t dims1[] = {MISC12_SPACE1_DIM1};
|
||||
hsize_t dimsn[] = {MISC12_APPEND_SIZE};
|
||||
hsize_t maxdims1[1] = {H5S_UNLIMITED};
|
||||
hsize_t chkdims1[1] = {MISC12_CHUNK_SIZE};
|
||||
hsize_t newsize[1] = {MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE};
|
||||
hsize_t offset[1] = {MISC12_SPACE1_DIM1};
|
||||
hsize_t offset[1] = {MISC12_SPACE1_DIM1};
|
||||
hsize_t count[1] = {MISC12_APPEND_SIZE};
|
||||
int i; /* counting variable */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing VL-type in chunked dataset\n"));
|
||||
@ -2746,10 +2745,10 @@ test_misc16(void)
|
||||
herr_t ret; /* Generic return value */
|
||||
char wdata[MISC16_SPACE_DIM][MISC16_STR_SIZE];
|
||||
char rdata[MISC16_SPACE_DIM][MISC16_STR_SIZE]; /* Information read in */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t tid; /* Datatype ID */
|
||||
hsize_t dims[] = {MISC16_SPACE_DIM};
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t tid; /* Datatype ID */
|
||||
hsize_t dims[] = {MISC16_SPACE_DIM};
|
||||
int i;
|
||||
|
||||
/* Initialize the data */
|
||||
@ -2831,10 +2830,10 @@ test_misc17(void)
|
||||
herr_t ret; /* Generic return value */
|
||||
char wdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2];
|
||||
char rdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2]; /* Information read in */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t tid; /* Datatype ID */
|
||||
hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2};
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid; /* Dataspace ID */
|
||||
hid_t tid; /* Datatype ID */
|
||||
hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2};
|
||||
int i;
|
||||
|
||||
/* Initialize the data */
|
||||
@ -3798,13 +3797,13 @@ test_misc22(void)
|
||||
|
||||
/* compute the correct PPB that should be set by SZIP */
|
||||
if(offsets[k] == 0)
|
||||
correct = prec[j];
|
||||
correct = prec[j];
|
||||
else
|
||||
correct = H5Tget_size(idts[i]) * 8;
|
||||
if(correct > 24) {
|
||||
if(correct <= 32)
|
||||
if(correct <= 32)
|
||||
correct = 32;
|
||||
else if(correct <= 64)
|
||||
else if(correct <= 64)
|
||||
correct = 64;
|
||||
} /* end if */
|
||||
|
||||
@ -4757,7 +4756,7 @@ test_misc25b(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
} /* end test_misc25b() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc25c(): Exercise another null object header message merge bug.
|
||||
@ -4891,7 +4890,7 @@ test_misc25c(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
} /* end test_misc25c() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc26(): Regression test: ensure that copying filter
|
||||
@ -4977,7 +4976,7 @@ test_misc26(void)
|
||||
CHECK_I(ret, "H5Pclose");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc27(): Ensure that objects with incorrect # of object
|
||||
@ -5022,7 +5021,7 @@ test_misc27(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
} /* end test_misc27() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc28(): Ensure that the dataset chunk cache will hold
|
||||
@ -5199,7 +5198,7 @@ test_misc28(void)
|
||||
CHECK_I(ret, "H5Pclose");
|
||||
} /* end test_misc28() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc29(): Ensure that speculative metadata reads don't
|
||||
@ -5239,7 +5238,7 @@ test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR
|
||||
{
|
||||
H5O_info_t object_info;
|
||||
|
||||
return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT);
|
||||
return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -5248,7 +5247,7 @@ test_misc30_get_info(hid_t loc_id)
|
||||
return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, test_misc30_get_info_cb, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc30(): Exercise local heap code that loads prefix
|
||||
@ -5280,15 +5279,15 @@ test_misc30(void)
|
||||
CHECK(ret, FAIL, "H5Gclose");
|
||||
ret = H5Fclose(fid);
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
|
||||
|
||||
for(i = 0; i < 20; i++) {
|
||||
char gname[32];
|
||||
|
||||
fid = H5Fopen(MISC30_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
|
||||
CHECK(fid, FAIL, "H5Fopen");
|
||||
|
||||
|
||||
if(get_info) {
|
||||
ret = test_misc30_get_info(fid);
|
||||
ret = test_misc30_get_info(fid);
|
||||
CHECK(ret, FAIL, "test_misc30_get_info");
|
||||
}
|
||||
|
||||
@ -5300,20 +5299,20 @@ test_misc30(void)
|
||||
CHECK(ret, FAIL, "H5Gclose");
|
||||
ret = H5Fclose(fid);
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fid = H5Fopen(MISC30_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
|
||||
CHECK(fid, FAIL, "H5Fopen");
|
||||
ret = H5Fget_filesize(fid, &file_size[get_info]);
|
||||
CHECK(fid, FAIL, "H5Fget_filesize");
|
||||
ret = H5Fclose(fid);
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
VERIFY(file_size[0], file_size[1], "test_misc30");
|
||||
} /* end test_misc30() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc31(): Test reentering library through deprecated
|
||||
@ -5404,14 +5403,14 @@ test_misc31(void)
|
||||
CHECK(ret, FAIL, "H5Fclose");
|
||||
ret = H5Tclose(dtype_id);
|
||||
CHECK(ret, FAIL, "H5Tclose");
|
||||
|
||||
|
||||
#else /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
/* Output message about test being skipped */
|
||||
MESSAGE(5, (" ...Skipped"));
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
} /* end test_misc31() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* test_misc32(): Simple test of filter memory allocation
|
||||
@ -5475,7 +5474,7 @@ test_misc32(void)
|
||||
resized = H5resize_memory(NULL, 0);
|
||||
CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/
|
||||
#endif /* NDEBUG */
|
||||
|
||||
|
||||
} /* end test_misc32() */
|
||||
|
||||
/****************************************************************
|
||||
@ -5585,7 +5584,7 @@ test_misc34(void)
|
||||
|
||||
} /* end test_misc34() */
|
||||
|
||||
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_misc(): Main misc. test routine.
|
||||
@ -5638,15 +5637,15 @@ test_misc(void)
|
||||
|
||||
} /* test_misc() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_misc
|
||||
* Function: cleanup_misc
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Albert Cheng
|
||||
* Programmer: Albert Cheng
|
||||
* July 2, 1998
|
||||
*
|
||||
* Modifications:
|
||||
|
178
test/trefer.c
178
test/trefer.c
@ -13,7 +13,7 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: trefer
|
||||
* Test program: trefer
|
||||
*
|
||||
* Test the Reference functionality
|
||||
*
|
||||
@ -21,24 +21,22 @@
|
||||
|
||||
#include "testhdf5.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
|
||||
#define FILE1 "trefer1.h5"
|
||||
#define FILE2 "trefer2.h5"
|
||||
#define FILE3 "trefer3.h5"
|
||||
#define FILE2 "trefer2.h5"
|
||||
#define FILE3 "trefer3.h5"
|
||||
|
||||
/* 1-D dataset with fixed dimensions */
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
|
||||
/* 2-D dataset with fixed dimensions */
|
||||
#define SPACE2_RANK 2
|
||||
#define SPACE2_DIM1 10
|
||||
#define SPACE2_DIM2 10
|
||||
#define SPACE2_RANK 2
|
||||
#define SPACE2_DIM1 10
|
||||
#define SPACE2_DIM2 10
|
||||
|
||||
/* Larger 1-D dataset with fixed dimensions */
|
||||
#define SPACE3_RANK 1
|
||||
#define SPACE3_DIM1 100
|
||||
#define SPACE3_RANK 1
|
||||
#define SPACE3_DIM1 100
|
||||
|
||||
/* Element selection information */
|
||||
#define POINT1_NPOINTS 10
|
||||
@ -81,7 +79,7 @@ test_reference_params(void)
|
||||
unsigned *tu32; /* Temporary pointer to uint32 data */
|
||||
int i; /* counting variables */
|
||||
const char *write_comment = "Foo!"; /* Comments for group */
|
||||
hid_t ret_id; /* Generic hid_t return value */
|
||||
hid_t ret_id; /* Generic hid_t return value */
|
||||
ssize_t name_size; /* Size of reference name */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
@ -104,7 +102,7 @@ test_reference_params(void)
|
||||
/* Create dataset access property list */
|
||||
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
|
||||
CHECK(dapl_id, FAIL, "H5Pcreate");
|
||||
|
||||
|
||||
/* Create a group */
|
||||
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
CHECK(group, FAIL, "H5Gcreate2");
|
||||
@ -247,13 +245,13 @@ test_reference_params(void)
|
||||
static void
|
||||
test_reference_obj(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, /* Dataset ID */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, /* Dataset ID */
|
||||
dset2; /* Dereferenced dataset ID */
|
||||
hid_t group; /* Group ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hid_t group; /* Group ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hid_t dapl_id; /* Dataset access property list */
|
||||
hobj_ref_t *wbuf, /* buffer to write to disk */
|
||||
*rbuf, /* buffer read from disk */
|
||||
@ -265,7 +263,7 @@ test_reference_obj(void)
|
||||
char read_comment[10];
|
||||
H5O_type_t obj_type; /* Object type */
|
||||
ssize_t size; /* Comment length */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Object Reference Functions\n"));
|
||||
@ -286,7 +284,7 @@ test_reference_obj(void)
|
||||
/* Create dataset access property list */
|
||||
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
|
||||
CHECK(dapl_id, FAIL, "H5Pcreate");
|
||||
|
||||
|
||||
/* Create a group */
|
||||
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
CHECK(group, FAIL, "H5Gcreate2");
|
||||
@ -496,23 +494,23 @@ test_reference_obj(void)
|
||||
static void
|
||||
test_reference_region(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dset1, /* Dataset ID */
|
||||
dset2; /* Dereferenced dataset ID */
|
||||
hid_t sid1, /* Dataspace ID #1 */
|
||||
sid2; /* Dataspace ID #2 */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dset1, /* Dataset ID */
|
||||
dset2; /* Dereferenced dataset ID */
|
||||
hid_t sid1, /* Dataspace ID #1 */
|
||||
sid2; /* Dataspace ID #2 */
|
||||
hid_t dapl_id; /* Dataset access property list */
|
||||
hsize_t dims1[] = {SPACE1_DIM1},
|
||||
dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
|
||||
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
|
||||
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
|
||||
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
|
||||
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
|
||||
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
|
||||
hsize_t * coords; /* Coordinate buffer */
|
||||
hsize_t low[SPACE2_RANK]; /* Selection bounds */
|
||||
hsize_t high[SPACE2_RANK]; /* Selection bounds */
|
||||
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
|
||||
hsize_t dims1[] = {SPACE1_DIM1},
|
||||
dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
|
||||
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
|
||||
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
|
||||
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
|
||||
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
|
||||
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
|
||||
hsize_t * coords; /* Coordinate buffer */
|
||||
hsize_t low[SPACE2_RANK]; /* Selection bounds */
|
||||
hsize_t high[SPACE2_RANK]; /* Selection bounds */
|
||||
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
|
||||
*rbuf; /* buffer read from disk */
|
||||
hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */
|
||||
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
|
||||
@ -522,7 +520,7 @@ test_reference_region(void)
|
||||
int i, j; /* counting variables */
|
||||
hssize_t hssize_ret; /* hssize_t return value */
|
||||
htri_t tri_ret; /* htri_t return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
|
||||
hid_t dset_NA; /* Dataset id for undefined reference */
|
||||
hid_t space_NA; /* Dataspace id for undefined reference */
|
||||
@ -550,7 +548,7 @@ test_reference_region(void)
|
||||
/* Create dataset access property list */
|
||||
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
|
||||
CHECK(dapl_id, FAIL, "H5Pcreate");
|
||||
|
||||
|
||||
/* Create a dataset */
|
||||
dset2 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
CHECK(dset2, FAIL, "H5Dcreate2");
|
||||
@ -659,7 +657,7 @@ test_reference_region(void)
|
||||
/* Close and release resources for undefined region reference tests */
|
||||
ret = H5Dclose(dset_NA);
|
||||
CHECK(ret, FAIL, "H5Dclose");
|
||||
ret = H5Sclose(space_NA);
|
||||
ret = H5Sclose(space_NA);
|
||||
CHECK(ret, FAIL, "H5Sclose");
|
||||
|
||||
/* Close disk dataspace */
|
||||
@ -682,10 +680,10 @@ test_reference_region(void)
|
||||
fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, H5P_DEFAULT);
|
||||
CHECK(fid1, FAIL, "H5Fopen");
|
||||
|
||||
/*
|
||||
* Start the test of an undefined reference
|
||||
/*
|
||||
* Start the test of an undefined reference
|
||||
*/
|
||||
|
||||
|
||||
/* Open the dataset of the undefined references */
|
||||
dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT);
|
||||
CHECK(dset_NA, FAIL, "H5Dopen2");
|
||||
@ -693,28 +691,28 @@ test_reference_region(void)
|
||||
/* Read the data */
|
||||
ret = H5Dread(dset_NA, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA);
|
||||
CHECK(ret, FAIL, "H5Dread");
|
||||
|
||||
|
||||
/*
|
||||
* Dereference an undefined reference (should fail)
|
||||
*/
|
||||
H5E_BEGIN_TRY {
|
||||
dset2 = H5Rdereference2(dset_NA, H5P_DEFAULT, H5R_DATASET_REGION, &rdata_NA[0]);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(dset2, FAIL, "H5Rdereference2");
|
||||
} H5E_END_TRY;
|
||||
VERIFY(dset2, FAIL, "H5Rdereference2");
|
||||
|
||||
/* Close and release resources. */
|
||||
ret = H5Dclose(dset_NA);
|
||||
CHECK(ret, FAIL, "H5Dclose");
|
||||
|
||||
/* This close should fail since H5Rdereference2 never created
|
||||
/* This close should fail since H5Rdereference2 never created
|
||||
* the id of the referenced object. */
|
||||
H5E_BEGIN_TRY {
|
||||
ret = H5Dclose(dset2);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(ret, FAIL, "H5Dclose");
|
||||
} H5E_END_TRY;
|
||||
VERIFY(ret, FAIL, "H5Dclose");
|
||||
|
||||
/*
|
||||
* End the test of an undefined reference
|
||||
/*
|
||||
* End the test of an undefined reference
|
||||
*/
|
||||
|
||||
/* Open the dataset */
|
||||
@ -893,22 +891,22 @@ test_reference_region(void)
|
||||
static void
|
||||
test_reference_region_1D(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dset1, /* Dataset ID */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dset1, /* Dataset ID */
|
||||
dset3; /* Dereferenced dataset ID */
|
||||
hid_t sid1, /* Dataspace ID #1 */
|
||||
sid3; /* Dataspace ID #3 */
|
||||
hid_t sid1, /* Dataspace ID #1 */
|
||||
sid3; /* Dataspace ID #3 */
|
||||
hid_t dapl_id; /* Dataset access property list */
|
||||
hsize_t dims1[] = {SPACE1_DIM1},
|
||||
dims3[] = {SPACE3_DIM1};
|
||||
hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
|
||||
hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
|
||||
hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */
|
||||
hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */
|
||||
hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
|
||||
hsize_t dims1[] = {SPACE1_DIM1},
|
||||
dims3[] = {SPACE3_DIM1};
|
||||
hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
|
||||
hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
|
||||
hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */
|
||||
hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */
|
||||
hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
|
||||
hsize_t * coords; /* Coordinate buffer */
|
||||
hsize_t low[SPACE3_RANK]; /* Selection bounds */
|
||||
hsize_t high[SPACE3_RANK]; /* Selection bounds */
|
||||
hsize_t low[SPACE3_RANK]; /* Selection bounds */
|
||||
hsize_t high[SPACE3_RANK]; /* Selection bounds */
|
||||
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
|
||||
*rbuf; /* buffer read from disk */
|
||||
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
|
||||
@ -916,7 +914,7 @@ test_reference_region_1D(void)
|
||||
uint8_t *tu8; /* Temporary pointer to uint8 data */
|
||||
H5O_type_t obj_type; /* Object type */
|
||||
int i; /* counting variables */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n"));
|
||||
@ -938,7 +936,7 @@ test_reference_region_1D(void)
|
||||
/* Create dataset access property list */
|
||||
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
|
||||
CHECK(dapl_id, FAIL, "H5Pcreate");
|
||||
|
||||
|
||||
/* Create a dataset */
|
||||
dset3 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
||||
CHECK(dset3, FAIL, "H5Dcreate2");
|
||||
@ -1178,14 +1176,14 @@ test_reference_region_1D(void)
|
||||
static void
|
||||
test_reference_obj_deleted(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, /* Dataset ID */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, /* Dataset ID */
|
||||
dset2; /* Dereferenced dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hobj_ref_t oref; /* Object Reference to test */
|
||||
H5O_type_t obj_type; /* Object type */
|
||||
haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
|
||||
herr_t ret; /* Generic return value */
|
||||
haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Create file */
|
||||
fid1 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
@ -1444,25 +1442,25 @@ test_reference_group(void)
|
||||
static void
|
||||
test_reference_compat(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, dset2; /* Dataset ID */
|
||||
hid_t group, group2; /* Group ID */
|
||||
hid_t sid1, /* Dataspace IDs */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, dset2; /* Dataset ID */
|
||||
hid_t group, group2; /* Group ID */
|
||||
hid_t sid1, /* Dataspace IDs */
|
||||
sid2;
|
||||
hid_t tid1, tid2; /* Datatype ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1},
|
||||
dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
|
||||
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
|
||||
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
|
||||
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
|
||||
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
|
||||
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
|
||||
hid_t tid1, tid2; /* Datatype ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1},
|
||||
dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
|
||||
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
|
||||
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
|
||||
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
|
||||
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
|
||||
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
|
||||
hobj_ref_t *wbuf_obj, /* Buffer to write to disk */
|
||||
*rbuf_obj; /* Buffer read from disk */
|
||||
hdset_reg_ref_t *wbuf_reg, /* Buffer to write to disk */
|
||||
*rbuf_reg; /* Buffer read from disk */
|
||||
H5G_obj_t obj_type; /* Object type */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Deprecated Object Reference Functions\n"));
|
||||
@ -1750,15 +1748,15 @@ test_reference(void)
|
||||
|
||||
} /* test_reference() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_reference
|
||||
* Function: cleanup_reference
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Programmer: Quincey Koziol
|
||||
* September 8, 1998
|
||||
*
|
||||
* Modifications:
|
||||
|
14
test/ttime.c
14
test/ttime.c
@ -13,7 +13,7 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: ttime
|
||||
* Test program: ttime
|
||||
*
|
||||
* Test the Time Datatype functionality
|
||||
*
|
||||
@ -21,8 +21,6 @@
|
||||
|
||||
#include "testhdf5.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
|
||||
#define DATAFILE "ttime.h5"
|
||||
#ifdef NOT_YET
|
||||
#define DATASETNAME "Dataset"
|
||||
@ -215,15 +213,15 @@ test_time(void)
|
||||
|
||||
} /* test_time() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_time
|
||||
* Function: cleanup_time
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Programmer: Quincey Koziol
|
||||
* October 19, 2000
|
||||
*
|
||||
* Modifications:
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: tvlstr
|
||||
* Test program: tvlstr
|
||||
*
|
||||
* Test the Variable-Length String functionality
|
||||
*
|
||||
@ -21,14 +21,12 @@
|
||||
|
||||
#include "testhdf5.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
|
||||
#define DATAFILE "tvlstr.h5"
|
||||
#define DATAFILE2 "tvlstr2.h5"
|
||||
|
||||
/* 1-D dataset with fixed dimensions */
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
|
||||
#define VLSTR_TYPE "vl_string_type"
|
||||
|
||||
@ -115,17 +113,17 @@ test_vlstrings_basic(void)
|
||||
char *rdata[SPACE1_DIM1]; /* Information read in */
|
||||
char *wdata2;
|
||||
hid_t dataspace, dataset2;
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t xfer_pid; /* Dataset transfer property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i; /* counting variable */
|
||||
size_t str_used; /* String data in memory */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic VL String Functionality\n"));
|
||||
@ -247,14 +245,14 @@ test_vlstrings_special(void)
|
||||
const char *wdata2[SPACE1_DIM1] = {NULL, NULL, NULL, NULL};
|
||||
char *rdata[SPACE1_DIM1]; /* Information read in */
|
||||
char *fill; /* Fill value */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t dcpl; /* Dataset creation property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t dcpl; /* Dataset creation property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
unsigned i; /* counting variable */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Special VL Strings\n"));
|
||||
@ -477,14 +475,14 @@ test_compact_vlstring(void)
|
||||
{
|
||||
const char *wdata[SPACE1_DIM1] = {"one", "two", "three", "four"};
|
||||
char *rdata[SPACE1_DIM1]; /* Information read in */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t plist; /* Dataset creation property list */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t plist; /* Dataset creation property list */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
unsigned i; /* counting variable */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing VL Strings in compact dataset\n"));
|
||||
@ -873,15 +871,15 @@ test_vlstrings(void)
|
||||
test_vl_rewrite();
|
||||
} /* test_vlstrings() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_vlstrings
|
||||
* Function: cleanup_vlstrings
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Programmer: Quincey Koziol
|
||||
* September 10, 1999
|
||||
*
|
||||
* Modifications:
|
||||
|
137
test/tvltypes.c
137
test/tvltypes.c
@ -13,7 +13,7 @@
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* Test program: tvltypes
|
||||
* Test program: tvltypes
|
||||
*
|
||||
* Test the Variable-Length Datatype functionality
|
||||
*
|
||||
@ -21,24 +21,23 @@
|
||||
|
||||
#include "testhdf5.h"
|
||||
|
||||
#include "hdf5.h"
|
||||
#include "H5Dprivate.h"
|
||||
|
||||
#define FILENAME "tvltypes.h5"
|
||||
|
||||
/* 1-D dataset with fixed dimensions */
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_RANK 1
|
||||
#define SPACE1_DIM1 4
|
||||
|
||||
/* 1-D dataset with fixed dimensions */
|
||||
#define SPACE3_RANK 1
|
||||
#define SPACE3_RANK 1
|
||||
#define SPACE3_DIM1 128
|
||||
#define L1_INCM 16
|
||||
#define L2_INCM 8
|
||||
#define L3_INCM 3
|
||||
|
||||
/* 1-D dataset with fixed dimensions */
|
||||
#define SPACE4_RANK 1
|
||||
#define SPACE4_RANK 1
|
||||
#define SPACE4_DIM_SMALL 128
|
||||
#define SPACE4_DIM_LARGE (H5D_TEMP_BUF_SIZE / 64)
|
||||
|
||||
@ -104,7 +103,7 @@ static void
|
||||
test_vltypes_dataset_create(void)
|
||||
{
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dcpl; /* Dataset Property list */
|
||||
hid_t dcpl; /* Dataset Property list */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
@ -136,7 +135,7 @@ test_vltypes_dataset_create(void)
|
||||
|
||||
/* Create a dataset, supposed to fail */
|
||||
H5E_BEGIN_TRY {
|
||||
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT);
|
||||
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT);
|
||||
} H5E_END_TRY;
|
||||
VERIFY(dataset, FAIL, "H5Dcreate2");
|
||||
|
||||
@ -230,18 +229,18 @@ test_vltypes_vlen_atomic(void)
|
||||
hvl_t wdata2[SPACE1_DIM1]; /* Information to write */
|
||||
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
|
||||
hvl_t fill; /* Fill value */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t sid2; /* ID of bad dataspace (no extent set) */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t tid1; /* Datatype ID */
|
||||
hid_t dcpl_pid; /* Dataset creation property list ID */
|
||||
hid_t xfer_pid; /* Dataset transfer property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Atomic VL Datatype Functionality\n"));
|
||||
@ -556,7 +555,7 @@ rewrite_vltypes_vlen_atomic(void)
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
unsigned increment=4;
|
||||
unsigned increment=4;
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
@ -709,16 +708,16 @@ test_vltypes_vlen_compound(void)
|
||||
} s1;
|
||||
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
|
||||
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2; /* Datatype IDs */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2; /* Datatype IDs */
|
||||
hid_t xfer_pid; /* Dataset transfer property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Basic Compound VL Datatype Functionality\n"));
|
||||
@ -863,7 +862,7 @@ rewrite_vltypes_vlen_compound(void)
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
unsigned increment=4;
|
||||
unsigned increment=4;
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
@ -1001,14 +1000,14 @@ test_vltypes_compound_vlen_vlen(void)
|
||||
} s1;
|
||||
s1 *wdata; /* data to write */
|
||||
s1 *rdata; /* data to read */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2, tid3; /* Datatype IDs */
|
||||
hsize_t dims1[] = {SPACE3_DIM1};
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2, tid3; /* Datatype IDs */
|
||||
hsize_t dims1[] = {SPACE3_DIM1};
|
||||
unsigned i,j,k; /* counting variables */
|
||||
hvl_t *t1, *t2; /* Temporary pointer to VL information */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
|
||||
@ -1182,21 +1181,21 @@ test_vltypes_compound_vlstr(void)
|
||||
s1 wdata2[SPACE1_DIM1]; /* data to write */
|
||||
s1 rdata[SPACE1_DIM1]; /* data to read */
|
||||
s1 rdata2[SPACE1_DIM1]; /* data to read */
|
||||
char str[64] = "a\0";
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, dset2; /* Dataset ID */
|
||||
hid_t sid1, sid2, filespace, filespace2; /* Dataspace ID */
|
||||
hid_t tid1, tid2, tid3, tid4, tid5; /* Datatype IDs */
|
||||
hid_t cparms;
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t chunk_dims[] = {SPACE1_DIM1/2};
|
||||
hsize_t maxdims[] = {H5S_UNLIMITED};
|
||||
hsize_t size[] = {SPACE1_DIM1};
|
||||
hsize_t offset[] = {0};
|
||||
char str[64] = "a\0";
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset, dset2; /* Dataset ID */
|
||||
hid_t sid1, sid2, filespace, filespace2; /* Dataspace ID */
|
||||
hid_t tid1, tid2, tid3, tid4, tid5; /* Datatype IDs */
|
||||
hid_t cparms;
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t chunk_dims[] = {SPACE1_DIM1/2};
|
||||
hsize_t maxdims[] = {H5S_UNLIMITED};
|
||||
hsize_t size[] = {SPACE1_DIM1};
|
||||
hsize_t offset[] = {0};
|
||||
unsigned i,j; /* counting variables */
|
||||
s2 *t1, *t2; /* Temporary pointer to VL information */
|
||||
int val;
|
||||
herr_t ret; /* Generic return value */
|
||||
int val;
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing VL Datatype of Compound Datatype with VL String Functionality\n"));
|
||||
@ -1374,10 +1373,10 @@ test_vltypes_compound_vlstr(void)
|
||||
wdata2[i].v.p=(s2*)HDmalloc((i+1)*sizeof(s2));
|
||||
wdata2[i].v.len=i+1;
|
||||
for(t1=(s2*)(wdata2[i].v).p, j=0; j<i+1; j++, t1++) {
|
||||
strcat(str, "pp");
|
||||
t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1);
|
||||
strcat(str, "pp");
|
||||
t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1);
|
||||
strcpy(t1->string, str);
|
||||
t1->color = green;
|
||||
t1->color = green;
|
||||
}
|
||||
} /* end for */
|
||||
|
||||
@ -1467,17 +1466,17 @@ test_vltypes_compound_vlen_atomic(void)
|
||||
s1 wdata[SPACE1_DIM1]; /* Information to write */
|
||||
s1 rdata[SPACE1_DIM1]; /* Information read in */
|
||||
s1 fill; /* Fill value */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2; /* Datatype IDs */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2; /* Datatype IDs */
|
||||
hid_t xfer_pid; /* Dataset transfer property list ID */
|
||||
hid_t dcpl_pid; /* Dataset creation property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
|
||||
@ -1671,9 +1670,9 @@ test_vltypes_compound_vlen_atomic(void)
|
||||
/****************************************************************
|
||||
**
|
||||
** rewrite_vltypes_compound_vlen_atomic(): Check memory leak for
|
||||
** basic VL datatype code.
|
||||
** basic VL datatype code.
|
||||
** Check memory leak for compound datatypes with VL datatypes
|
||||
** of atomic datatypes.
|
||||
** of atomic datatypes.
|
||||
**
|
||||
****************************************************************/
|
||||
static void
|
||||
@ -1694,7 +1693,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
unsigned increment=4;
|
||||
unsigned increment=4;
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
@ -1855,16 +1854,16 @@ test_vltypes_vlen_vlen_atomic(void)
|
||||
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
|
||||
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
|
||||
hvl_t *t1, *t2; /* Temporary pointer to VL information */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2; /* Datatype IDs */
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid1, tid2; /* Datatype IDs */
|
||||
hid_t xfer_pid; /* Dataset transfer property list ID */
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t dims1[] = {SPACE1_DIM1};
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j,k; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
herr_t ret; /* Generic return value */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing VL Datatypes with VL Atomic Datatype Component Functionality\n"));
|
||||
@ -2049,12 +2048,12 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
|
||||
hid_t fid1; /* HDF5 File IDs */
|
||||
hid_t dataset; /* Dataset ID */
|
||||
hid_t sid1; /* Dataspace ID */
|
||||
hid_t tid2; /* Datatype IDs */
|
||||
hid_t tid2; /* Datatype IDs */
|
||||
hid_t xfer_pid; /* Dataset transfer property list ID */
|
||||
hsize_t size; /* Number of bytes which will be used */
|
||||
unsigned i,j,k; /* counting variables */
|
||||
size_t mem_used=0; /* Memory used during allocation */
|
||||
unsigned increment=1;
|
||||
unsigned increment=1;
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
@ -3171,15 +3170,15 @@ test_vltypes(void)
|
||||
|
||||
/* These next tests use the same file */
|
||||
test_vltypes_dataset_create(); /* Check dataset of VL when fill value
|
||||
* won't be rewritten to it.*/
|
||||
* won't be rewritten to it.*/
|
||||
test_vltypes_funcs(); /* Test functions with VL types */
|
||||
test_vltypes_vlen_atomic(); /* Test VL atomic datatypes */
|
||||
rewrite_vltypes_vlen_atomic(); /* Check VL memory leak */
|
||||
rewrite_vltypes_vlen_atomic(); /* Check VL memory leak */
|
||||
test_vltypes_vlen_compound(); /* Test VL compound datatypes */
|
||||
rewrite_vltypes_vlen_compound(); /* Check VL memory leak */
|
||||
rewrite_vltypes_vlen_compound(); /* Check VL memory leak */
|
||||
test_vltypes_compound_vlen_atomic(); /* Test compound datatypes with VL atomic components */
|
||||
rewrite_vltypes_compound_vlen_atomic();/* Check VL memory leak */
|
||||
test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */
|
||||
rewrite_vltypes_compound_vlen_atomic();/* Check VL memory leak */
|
||||
test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */
|
||||
rewrite_longer_vltypes_vlen_vlen_atomic(); /*overwrite with VL data of longer sequence*/
|
||||
rewrite_shorter_vltypes_vlen_vlen_atomic(); /*overwrite with VL data of shorted sequence*/
|
||||
test_vltypes_compound_vlen_vlen();/* Test compound datatypes with VL atomic components */
|
||||
@ -3187,15 +3186,15 @@ test_vltypes(void)
|
||||
test_vltypes_fill_value(); /* Test fill value for VL data */
|
||||
} /* test_vltypes() */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: cleanup_vltypes
|
||||
* Function: cleanup_vltypes
|
||||
*
|
||||
* Purpose: Cleanup temporary test files
|
||||
* Purpose: Cleanup temporary test files
|
||||
*
|
||||
* Return: none
|
||||
* Return: none
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Programmer: Quincey Koziol
|
||||
* June 8, 1999
|
||||
*
|
||||
* Modifications:
|
||||
|
Loading…
Reference in New Issue
Block a user