more complicated test setup
This commit is contained in:
parent
2147ac3a12
commit
7dcfb036f9
|
@ -1,7 +1,15 @@
|
|||
program DAMASK_test
|
||||
use prec
|
||||
use parallelization
|
||||
use HDF5_utilities
|
||||
|
||||
use test_prec
|
||||
use test_HDF5_utilities
|
||||
|
||||
call prec_selfTest()
|
||||
call prec_test()
|
||||
|
||||
call parallelization_init()
|
||||
call HDF5_utilities_init()
|
||||
|
||||
call HDF5_utilities_test()
|
||||
|
||||
end program DAMASK_test
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
module test_HDF5_utilities
|
||||
use prec
|
||||
use HDF5
|
||||
use HDF5_utilities
|
||||
|
||||
implicit none(type,external)
|
||||
|
||||
private
|
||||
public :: HDF5_utilities_test
|
||||
|
||||
contains
|
||||
|
||||
subroutine HDF5_utilities_test()
|
||||
|
||||
print*, 'begin test HDF5_utilities'
|
||||
call test_read_write()
|
||||
print*, 'end test HDF5_utilities'
|
||||
|
||||
end subroutine HDF5_utilities_test
|
||||
|
||||
|
||||
subroutine test_read_write()
|
||||
|
||||
integer(HID_T) :: f
|
||||
real(pReal), dimension(3) :: d_in,d_out
|
||||
|
||||
|
||||
call random_number(d_in)
|
||||
|
||||
f = HDF5_openFile('test.hdf5','w')
|
||||
|
||||
call HDF5_write(d_in,f,'test')
|
||||
call HDF5_read(d_out,f,'test')
|
||||
|
||||
if (any(d_in /= d_out)) error stop 'test_read_write'
|
||||
|
||||
end subroutine test_read_write
|
||||
|
||||
end module test_HDF5_utilities
|
|
@ -0,0 +1,19 @@
|
|||
module test_prec
|
||||
use prec
|
||||
|
||||
implicit none(type,external)
|
||||
|
||||
private
|
||||
public :: prec_test
|
||||
|
||||
contains
|
||||
|
||||
subroutine prec_test()
|
||||
|
||||
print*, 'begin test prec'
|
||||
call prec_selfTest()
|
||||
print*, 'end test prec'
|
||||
|
||||
end subroutine prec_test
|
||||
|
||||
end module test_prec
|
Loading…
Reference in New Issue