added connector_name test

This commit is contained in:
M. Scot Breitenfeld 2019-04-24 15:17:10 -05:00
parent fc769f425f
commit 1d6641ee3a
3 changed files with 19 additions and 3 deletions

View File

@ -242,7 +242,7 @@ CONTAINS
IF(INT(H5VLget_connector_name(obj_id, c_name, l), SIZE_T).LT.0)THEN
hdferr = H5I_INVALID_HID_F
ELSE
PRINT*,c_name
PRINT*,"C_NAME", c_name
CALL HD5c2fstring(name,c_name,LEN(name))
PRINT*,"name", name
ENDIF

View File

@ -58,8 +58,8 @@ CONTAINS
CHARACTER(LEN=64) :: name
INTEGER(SIZE_T) :: name_len
INTEGER :: cmp = -1
CHARACTER(LEN=12) :: filename = "h5null.posix"
INTEGER(HID_T) :: file_id
! CHARACTER(LEN=12) :: filename = "h5null.posix"
! INTEGER(HID_T) :: file_id
! The null VOL connector should not be registered at the start of the test
CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error)
@ -78,6 +78,14 @@ CONTAINS
CALL H5VLget_connector_id_f(NULL_VOL_CONNECTOR_NAME, vol_id_out, error)
CALL check("H5VLget_connector_id_f",error,total_error)
PRINT*,vol_id_out
CALL H5VLget_connector_name_f(vol_id_out, name, error, name_len)
CALL check("H5VLget_connector_name_f",error,total_error)
! CALL H5VLget_connector_name_f(vol_id_out, name, error)
! CALL check("H5VLget_connector_name_f",error,total_error)
CALL H5VLcmp_connector_cls_f( cmp, vol_id_out, vol_id, error)
CALL check("H5VLcmp_connector_cls_f",error, total_error)
CALL VERIFY("H5VLcmp_connector_cls_f", cmp, 0, total_error)

View File

@ -219,6 +219,8 @@ test_getters(void)
htri_t is_registered = FAIL;
hid_t vol_id = H5I_INVALID_HID;
hid_t vol_id_out = H5I_INVALID_HID;
char name[64];
size_t size = 0;
TESTING("VOL getters");
@ -238,6 +240,12 @@ test_getters(void)
if(vol_id != vol_id_out)
FAIL_PUTS_ERROR("VOL connector IDs don't match");
if((vol_id_out = H5VLget_connector_name(vol_id_out, name, size)) < 0)
TEST_ERROR;
printf("%s %ld \n", name, size);
/* Unregister the connector */
if(H5VLunregister_connector(vol_id) < 0)
TEST_ERROR;