5
5
module test_specialfunctions_gamma
6
6
use testdrive, only : new_unittest, unittest_type, error_type, check
7
7
use stdlib_kinds, only: sp, dp, xdp, qp, int8, int16, int32, int64
8
+ use stdlib_error, only: state_type, STDLIB_VALUE_ERROR
8
9
use stdlib_specialfunctions_gamma, only: gamma, log_gamma, log_factorial, &
9
10
lower_incomplete_gamma, &
10
11
upper_incomplete_gamma, &
@@ -113,7 +114,7 @@ contains
113
114
#:endif
114
115
115
116
do i = 1, n
116
-
117
+
117
118
call check(error, log_factorial(x(i)), ans(i), "Integer kind " &
118
119
//"${k1}$ failed", thr = tol_dp, rel = .true.)
119
120
@@ -130,6 +131,7 @@ contains
130
131
type(error_type), allocatable, intent(out) :: error
131
132
integer, parameter :: n = 5
132
133
integer :: i
134
+ type(state_type) :: err
133
135
134
136
#:if k1 == "int8"
135
137
@@ -182,13 +184,20 @@ contains
182
184
#:elif t1[0] == "c"
183
185
184
186
do i = 1, n
187
+
188
+ err = state_type(STDLIB_VALUE_ERROR,'Complex ${k1}$ failed: x=',x(i),' gamma=',gamma(x(i)), &
189
+ 'expected=',ans(i),' tol=',tol_${k1}$)
185
190
186
- call check(error, gamma(x(i)), ans(i), "Complex kind ${k1}$ failed" ,&
191
+ call check(error, gamma(x(i)), ans(i), err%print() ,&
187
192
thr = tol_${k1}$, rel = .true.)
188
193
189
- end do
194
+ !call check(error, gamma(x(i)), ans(i), "Complex kind ${k1}$ failed",&
195
+ ! thr = tol_${k1}$, rel = .true.)
190
196
197
+ end do
198
+
191
199
#:endif
200
+
192
201
end subroutine test_gamma_${t1[0]}$${k1}$
193
202
194
203
0 commit comments