summaryrefslogtreecommitdiffstats
path: root/fortran/test/vol_connector.F90
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-05-16 20:05:12 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-05-16 20:05:12 (GMT)
commit32c4900e89d845f0490bdbabddd2aab9c42165de (patch)
tree9696fb9367034965b4d9624c6277f2a5b61c9ec8 /fortran/test/vol_connector.F90
parent1d6641ee3af65bdbe5e0f1f8fa56be8ea52dd5d7 (diff)
downloadhdf5-32c4900e89d845f0490bdbabddd2aab9c42165de.zip
hdf5-32c4900e89d845f0490bdbabddd2aab9c42165de.tar.gz
hdf5-32c4900e89d845f0490bdbabddd2aab9c42165de.tar.bz2
removed VOLL NULL connector and replaced it with native VOL
Diffstat (limited to 'fortran/test/vol_connector.F90')
-rw-r--r--fortran/test/vol_connector.F9049
1 files changed, 20 insertions, 29 deletions
diff --git a/fortran/test/vol_connector.F90 b/fortran/test/vol_connector.F90
index 7810c97..7f19d79 100644
--- a/fortran/test/vol_connector.F90
+++ b/fortran/test/vol_connector.F90
@@ -31,9 +31,8 @@ MODULE VOL_TMOD
USE THDF5_F03
IMPLICIT NONE
-
- INTEGER, PARAMETER :: NULL_VOL_CONNECTOR_VALUE = 160
- CHARACTER(LEN=18), PARAMETER :: NULL_VOL_CONNECTOR_NAME = "null_vol_connector"
+ INTEGER, PARAMETER :: NATIVE_VOL_CONNECTOR_VALUE = 0
+ CHARACTER(LEN=6), PARAMETER :: NATIVE_VOL_CONNECTOR_NAME = "native"
CONTAINS
@@ -57,50 +56,47 @@ CONTAINS
INTEGER(hid_t) :: vol_id = 0, vol_id_out = 1
CHARACTER(LEN=64) :: name
INTEGER(SIZE_T) :: name_len
+ INTEGER(hid_t) :: file_id
INTEGER :: cmp = -1
-! 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)
+ CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
CALL check("H5VLis_connector_registered_f",error,total_error)
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
! Register the connector by name
- CALL H5VLregister_connector_by_name_f(NULL_VOL_CONNECTOR_NAME, vol_id, error)
+ CALL H5VLregister_connector_by_name_f(NATIVE_VOL_CONNECTOR_NAME, vol_id, error)
CALL check("H5VLregister_connector_by_name_f",error,total_error)
! The connector should be registered now
- CALL H5VLis_connector_registered_f(NULL_VOL_CONNECTOR_NAME, is_registered, error)
+ CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
CALL check("H5VLis_connector_registered_f",error,total_error)
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
- CALL H5VLget_connector_id_f(NULL_VOL_CONNECTOR_NAME, vol_id_out, error)
+ CALL H5VLget_connector_id_f(NATIVE_VOL_CONNECTOR_NAME, vol_id_out, error)
CALL check("H5VLget_connector_id_f",error,total_error)
- PRINT*,vol_id_out
+ CALL H5Fcreate_f("voltest.h5",H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("H5F_create_f",error,total_error)
- CALL H5VLget_connector_name_f(vol_id_out, name, error, name_len)
+ CALL H5VLget_connector_name_f(file_id, name, error, name_len)
CALL check("H5VLget_connector_name_f",error,total_error)
+ CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error)
- ! CALL H5VLget_connector_name_f(vol_id_out, name, error)
- ! CALL check("H5VLget_connector_name_f",error,total_error)
+ CALL H5VLget_connector_name_f(file_id, name, error)
+ CALL check("H5VLget_connector_name_f",error,total_error)
+ CALL VERIFY("H5VLget_connector_name_f", name, NATIVE_VOL_CONNECTOR_NAME, 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)
+ CALL H5Fclose_f(file_id, error)
+ CALL check("H5Fclose_f",error,total_error)
CALL H5VLclose_f(vol_id_out, error)
+ CALL check("H5VLclose_f",error, total_error)
! Unregister the connector
CALL H5VLunregister_connector_f(vol_id, error)
CALL check("H5VLunregister_connector_f", error, total_error)
- ! The connector should not be registered now
- CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
-
END SUBROUTINE test_registration_by_name
!-------------------------------------------------------------------------
@@ -123,16 +119,16 @@ CONTAINS
! 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)
+ CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
CALL check("H5VLis_connector_registered_f",error,total_error)
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
! Register the connector by value
- CALL H5VLregister_connector_by_value_f(NULL_VOL_CONNECTOR_VALUE, vol_id, error)
+ CALL H5VLregister_connector_by_value_f(NATIVE_VOL_CONNECTOR_VALUE, vol_id, error)
CALL check("H5VLregister_connector_by_value_f", error, total_error)
! The connector should be registered now
- CALL H5VLis_connector_registered_f(NULL_VOL_CONNECTOR_NAME, is_registered, error)
+ CALL H5VLis_connector_registered_f(NATIVE_VOL_CONNECTOR_NAME, is_registered, error)
CALL check("H5VLis_connector_registered_f",error,total_error)
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
@@ -140,11 +136,6 @@ CONTAINS
CALL H5VLunregister_connector_f(vol_id, error)
CALL check("H5VLunregister_connector_f", error, total_error)
- ! The connector should not be registered now
- CALL H5VLis_connector_registered_f( NULL_VOL_CONNECTOR_NAME, is_registered, error)
- CALL check("H5VLis_connector_registered_f",error,total_error)
- CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
-
END SUBROUTINE test_registration_by_value
END MODULE VOL_TMOD