11#:include "common.fypp"
2- #:set R_KINDS_TYPES = [KT for KT in REAL_KINDS_TYPES if KT[0] in ["sp","dp"]]
3- #:set C_KINDS_TYPES = [KT for KT in CMPLX_KINDS_TYPES if KT[0] in ["sp","dp"] ]
4- #:set CI_KINDS_TYPES = INT_KINDS_TYPES + C_KINDS_TYPES
2+ #:set CI_KINDS_TYPES = INT_KINDS_TYPES + CMPLX_KINDS_TYPES
3+ #:set IDX_CMPLX_KINDS_TYPES = [(i, CMPLX_KINDS[i], CMPLX_TYPES[i], CMPLX_INIT[i]) for i in range(len(CMPLX_KINDS)) ]
4+ #:set IDX_REAL_KINDS_TYPES = [(i, REAL_KINDS[i], REAL_TYPES[i], REAL_INIT[i]) for i in range(len(REAL_KINDS))]
55module test_specialfunctions_gamma
66 use testdrive, only : new_unittest, unittest_type, error_type, check
7- use stdlib_kinds, only: sp, dp, int8, int16, int32, int64
7+ use stdlib_kinds, only: sp, dp, xdp, qp, int8, int16, int32, int64
88 use stdlib_specialfunctions_gamma, only: gamma, log_gamma, log_factorial, &
99 lower_incomplete_gamma, &
1010 upper_incomplete_gamma, &
@@ -18,7 +18,7 @@ module test_specialfunctions_gamma
1818
1919 public :: collect_specialfunctions_gamma
2020
21- #:for k1, t1 in R_KINDS_TYPES
21+ #:for k1, t1 in REAL_KINDS_TYPES
2222 ${t1}$, parameter :: tol_${k1}$ = 1000 * epsilon(1.0_${k1}$)
2323 #:endfor
2424
@@ -35,15 +35,15 @@ contains
3535 test_logfact_${t1[0]}$${k1}$) &
3636 #:endfor
3737
38- #:for k1, t1 in CI_KINDS_TYPES
38+ #:for k1, t1 in CI_KINDS_TYPES[:-1]
3939 , new_unittest("gamma_${t1[0]}$${k1}$", &
4040 test_gamma_${t1[0]}$${k1}$) &
4141 , new_unittest("log_gamma_${t1[0]}$${k1}$", &
4242 test_loggamma_${t1[0]}$${k1}$) &
4343 #:endfor
4444
4545 #:for k1, t1 in INT_KINDS_TYPES
46- #:for k2, t2 in R_KINDS_TYPES
46+ #:for k2, t2 in REAL_KINDS_TYPES[:-1]
4747 , new_unittest("lower_incomplete_gamma_${t1[0]}$${k1}$${k2}$", &
4848 test_lincgamma_${t1[0]}$${k1}$${k2}$) &
4949 , new_unittest("log_lower_incomplete_gamma_${t1[0]}$${k1}$${k2}$", &
@@ -59,7 +59,7 @@ contains
5959 #:endfor
6060 #:endfor
6161
62- #:for k1, t1 in R_KINDS_TYPES
62+ #:for k1, t1 in REAL_KINDS_TYPES[:-1]
6363 , new_unittest("lower_incomplete_gamma_${t1[0]}$${k1}$", &
6464 test_lincgamma_${t1[0]}$${k1}$) &
6565 , new_unittest("log_lower_incomplete_gamma_${t1[0]}$${k1}$", &
@@ -124,7 +124,7 @@ contains
124124
125125
126126
127- #:for k1, t1 in CI_KINDS_TYPES
127+ #:for k1, t1 in CI_KINDS_TYPES[:-1]
128128
129129 subroutine test_gamma_${t1[0]}$${k1}$(error)
130130 type(error_type), allocatable, intent(out) :: error
@@ -262,7 +262,7 @@ contains
262262
263263
264264 #:for k1, t1 in INT_KINDS_TYPES
265- #:for k2, t2 in R_KINDS_TYPES
265+ #:for k2, t2 in REAL_KINDS_TYPES[:-1]
266266
267267 subroutine test_lincgamma_${t1[0]}$${k1}$${k2}$(error)
268268 type(error_type), allocatable, intent(out) :: error
@@ -411,7 +411,7 @@ contains
411411
412412
413413
414- #:for k1, t1 in R_KINDS_TYPES
414+ #:for k1, t1 in REAL_KINDS_TYPES[:-1]
415415
416416 subroutine test_lincgamma_${t1[0]}$${k1}$(error)
417417 type(error_type), allocatable, intent(out) :: error
0 commit comments