3 use testdrive,
only : new_unittest, unittest_type, error_type, check
5 initialize_array_efrw, initialize_array_efsw, initialize_bins_for_tables
10 public :: collect_tempo_utils_suite
15 subroutine collect_tempo_utils_suite(testsuite)
17 type(unittest_type),
allocatable,
intent(out) :: testsuite(:)
20 new_unittest(
"checking that procedure calc_gamma_p(8.,8.) = 0.547", &
22 new_unittest(
"checking initialization of rain-cloud water collection efficiency data after allocation resulting in all(t_efrw == 0.) being false", &
23 tableefrw_allzerofalse), &
24 new_unittest(
"checking initialization of snow-cloud water collection efficiency data after allocation resulting in all(t_efsw == 0.) being false", &
25 tableefsw_allzerofalse) &
28 end subroutine collect_tempo_utils_suite
30 subroutine calcgammap_a8x8(error)
32 type(error_type),
allocatable,
intent(out) :: error
33 real(wp) :: value_from_wolfram = 0.54703919051300551
35 call check(error, abs(calc_gamma_p(8.,8.) - value_from_wolfram) < 1.e-6_wp)
36 if (
allocated(error))
return
37 end subroutine calcgammap_a8x8
40 subroutine tableefrw_allzerofalse(error)
42 type(error_type),
allocatable,
intent(out) :: error
43 call initialize_bins_for_tables()
44 call initialize_array_efrw()
45 write(*,*) shape(t_efrw)
47 call check(error, all(t_efrw==0.0_dp), .false.)
48 if (
allocated(error))
return
49 end subroutine tableefrw_allzerofalse
52 subroutine tableefsw_allzerofalse(error)
54 type(error_type),
allocatable,
intent(out) :: error
55 call initialize_bins_for_tables()
56 call initialize_array_efsw()
58 call check(error, all(t_efsw==0.0_dp), .false.)
59 if (
allocated(error))
return
60 end subroutine tableefsw_allzerofalse
62end module test_tempo_utils_suite