mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-01-03 10:06:01 +01:00
adapt tests to assert-like behaviour
This commit is contained in:
parent
231fe479e7
commit
ba0f45d4aa
@ -28,7 +28,7 @@ subroutine test_write(file_name, back_end)
|
|||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
character*(*), intent(in) :: file_name
|
character*(*), intent(in) :: file_name
|
||||||
integer(trexio_backend), intent(in) :: back_end
|
integer, intent(in) :: back_end
|
||||||
|
|
||||||
integer(8) :: trex_file
|
integer(8) :: trex_file
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ subroutine test_write(file_name, back_end)
|
|||||||
call exit(1)
|
call exit(1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = trexio_write_nucleus_label(trex_file, label_str, 4)
|
if (back_end == TREXIO_HDF5) rc = trexio_write_nucleus_label(trex_file, label_str, 4)
|
||||||
deallocate(label_str)
|
deallocate(label_str)
|
||||||
if (rc == TREXIO_SUCCESS) then
|
if (rc == TREXIO_SUCCESS) then
|
||||||
write(*,*) 'SUCCESS WRITE LABEL'
|
write(*,*) 'SUCCESS WRITE LABEL'
|
||||||
@ -130,7 +130,7 @@ subroutine test_write(file_name, back_end)
|
|||||||
call exit(1)
|
call exit(1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = trexio_write_nucleus_point_group(trex_file, sym_str)
|
if (back_end == TREXIO_HDF5) rc = trexio_write_nucleus_point_group(trex_file, sym_str)
|
||||||
deallocate(sym_str)
|
deallocate(sym_str)
|
||||||
if (rc == TREXIO_SUCCESS) then
|
if (rc == TREXIO_SUCCESS) then
|
||||||
write(*,*) 'SUCCESS WRITE POINT GROUP'
|
write(*,*) 'SUCCESS WRITE POINT GROUP'
|
||||||
@ -182,7 +182,7 @@ subroutine test_read(file_name, back_end)
|
|||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
character*(*), intent(in) :: file_name
|
character*(*), intent(in) :: file_name
|
||||||
integer(trexio_backend), intent(in) :: back_end
|
integer, intent(in) :: back_end
|
||||||
|
|
||||||
integer(8) :: trex_file
|
integer(8) :: trex_file
|
||||||
|
|
||||||
@ -238,6 +238,8 @@ subroutine test_read(file_name, back_end)
|
|||||||
call exit(-1)
|
call exit(-1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (back_end == TREXIO_HDF5) then
|
||||||
|
|
||||||
rc = trexio_read_nucleus_label(trex_file, label_str, 4)
|
rc = trexio_read_nucleus_label(trex_file, label_str, 4)
|
||||||
|
|
||||||
! --------------------------------------------------
|
! --------------------------------------------------
|
||||||
@ -272,8 +274,8 @@ subroutine test_read(file_name, back_end)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
rc = trexio_read_nucleus_point_group(trex_file, sym_str)
|
rc = trexio_read_nucleus_point_group(trex_file, sym_str)
|
||||||
write(*,*) sym_str
|
write(*,*) sym_str(1:3)
|
||||||
if (rc == TREXIO_SUCCESS .and. (trim(sym_str) == 'B3U') ) then
|
if (rc == TREXIO_SUCCESS .and. (sym_str(1:3) == 'B3U') ) then
|
||||||
write(*,*) 'SUCCESS READ POINT GROUP'
|
write(*,*) 'SUCCESS READ POINT GROUP'
|
||||||
else
|
else
|
||||||
call trexio_string_of_error(TREXIO_READONLY,str)
|
call trexio_string_of_error(TREXIO_READONLY,str)
|
||||||
@ -281,6 +283,8 @@ subroutine test_read(file_name, back_end)
|
|||||||
call exit(-1)
|
call exit(-1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
rc = trexio_close(trex_file)
|
rc = trexio_close(trex_file)
|
||||||
if (rc == TREXIO_SUCCESS) then
|
if (rc == TREXIO_SUCCESS) then
|
||||||
write(*,*) 'SUCCESS CLOSE'
|
write(*,*) 'SUCCESS CLOSE'
|
||||||
|
Loading…
Reference in New Issue
Block a user