https://www.cdslab.org/paramonte/fortran/2
Current view: top level - test - test_pm_mathCumSum.F90 (source / functions) Hit Total Coverage
Test: ParaMonte 2.0.0 :: Serial Fortran - Code Coverage Report Lines: 30 30 100.0 %
Date: 2024-04-08 03:18:57 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       2             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       3             : !!!!                                                                                                                            !!!!
       4             : !!!!    ParaMonte: Parallel Monte Carlo and Machine Learning Library.                                                           !!!!
       5             : !!!!                                                                                                                            !!!!
       6             : !!!!    Copyright (C) 2012-present, The Computational Data Science Lab                                                          !!!!
       7             : !!!!                                                                                                                            !!!!
       8             : !!!!    This file is part of the ParaMonte library.                                                                             !!!!
       9             : !!!!                                                                                                                            !!!!
      10             : !!!!    LICENSE                                                                                                                 !!!!
      11             : !!!!                                                                                                                            !!!!
      12             : !!!!       https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md                                                          !!!!
      13             : !!!!                                                                                                                            !!!!
      14             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      15             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      16             : 
      17             : !>  \brief
      18             : !>  This module contains tests of the module [pm_mathCumSum](@ref pm_mathCumSum).
      19             : !>
      20             : !>  \fintest
      21             : !>
      22             : !>  \author
      23             : !>  \AmirShahmoradi, Tuesday 2:06 AM, September 21, 2021, Dallas, TX
      24             : 
      25             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      26             : 
      27             : module test_pm_mathCumSum
      28             : 
      29             :     use pm_mathCumSum ! LCOV_EXCL_LINE
      30             :     use pm_err, only: err_type
      31             :     use pm_test, only: test_type, LK
      32             :     use pm_kind, only: LK
      33             :     implicit none
      34             : 
      35             :     private
      36             :     public :: setTest
      37             :     type(test_type) :: test
      38             : 
      39             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      40             : 
      41             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      42             : 
      43             :     interface
      44             : #if     IK5_ENABLED
      45             :         module function test_getCumSum_IK5() result(assertion); logical(LK) :: assertion; end function
      46             : #endif
      47             : #if     IK4_ENABLED
      48             :         module function test_getCumSum_IK4() result(assertion); logical(LK) :: assertion; end function
      49             : #endif
      50             : #if     IK3_ENABLED
      51             :         module function test_getCumSum_IK3() result(assertion); logical(LK) :: assertion; end function
      52             : #endif
      53             : #if     IK2_ENABLED
      54             :         module function test_getCumSum_IK2() result(assertion); logical(LK) :: assertion; end function
      55             : #endif
      56             : #if     IK1_ENABLED
      57             :         module function test_getCumSum_IK1() result(assertion); logical(LK) :: assertion; end function
      58             : #endif
      59             :     end interface
      60             : 
      61             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      62             : 
      63             :     interface
      64             : #if     CK5_ENABLED
      65             :         module function test_getCumSum_CK5() result(assertion); logical(LK) :: assertion; end function
      66             : #endif
      67             : #if     CK4_ENABLED
      68             :         module function test_getCumSum_CK4() result(assertion); logical(LK) :: assertion; end function
      69             : #endif
      70             : #if     CK3_ENABLED
      71             :         module function test_getCumSum_CK3() result(assertion); logical(LK) :: assertion; end function
      72             : #endif
      73             : #if     CK2_ENABLED
      74             :         module function test_getCumSum_CK2() result(assertion); logical(LK) :: assertion; end function
      75             : #endif
      76             : #if     CK1_ENABLED
      77             :         module function test_getCumSum_CK1() result(assertion); logical(LK) :: assertion; end function
      78             : #endif
      79             :     end interface
      80             : 
      81             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      82             : 
      83             :     interface
      84             : #if     RK5_ENABLED
      85             :         module function test_getCumSum_RK5() result(assertion); logical(LK) :: assertion; end function
      86             : #endif
      87             : #if     RK4_ENABLED
      88             :         module function test_getCumSum_RK4() result(assertion); logical(LK) :: assertion; end function
      89             : #endif
      90             : #if     RK3_ENABLED
      91             :         module function test_getCumSum_RK3() result(assertion); logical(LK) :: assertion; end function
      92             : #endif
      93             : #if     RK2_ENABLED
      94             :         module function test_getCumSum_RK2() result(assertion); logical(LK) :: assertion; end function
      95             : #endif
      96             : #if     RK1_ENABLED
      97             :         module function test_getCumSum_RK1() result(assertion); logical(LK) :: assertion; end function
      98             : #endif
      99             :     end interface
     100             : 
     101             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     102             : 
     103             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     104             : 
     105             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     106             : 
     107             :     interface
     108             : #if     IK5_ENABLED
     109             :         module function test_setCumSum_IK5() result(assertion); logical(LK) :: assertion; end function
     110             : #endif
     111             : #if     IK4_ENABLED
     112             :         module function test_setCumSum_IK4() result(assertion); logical(LK) :: assertion; end function
     113             : #endif
     114             : #if     IK3_ENABLED
     115             :         module function test_setCumSum_IK3() result(assertion); logical(LK) :: assertion; end function
     116             : #endif
     117             : #if     IK2_ENABLED
     118             :         module function test_setCumSum_IK2() result(assertion); logical(LK) :: assertion; end function
     119             : #endif
     120             : #if     IK1_ENABLED
     121             :         module function test_setCumSum_IK1() result(assertion); logical(LK) :: assertion; end function
     122             : #endif
     123             :     end interface
     124             : 
     125             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     126             : 
     127             :     interface
     128             : #if     CK5_ENABLED
     129             :         module function test_setCumSum_CK5() result(assertion); logical(LK) :: assertion; end function
     130             : #endif
     131             : #if     CK4_ENABLED
     132             :         module function test_setCumSum_CK4() result(assertion); logical(LK) :: assertion; end function
     133             : #endif
     134             : #if     CK3_ENABLED
     135             :         module function test_setCumSum_CK3() result(assertion); logical(LK) :: assertion; end function
     136             : #endif
     137             : #if     CK2_ENABLED
     138             :         module function test_setCumSum_CK2() result(assertion); logical(LK) :: assertion; end function
     139             : #endif
     140             : #if     CK1_ENABLED
     141             :         module function test_setCumSum_CK1() result(assertion); logical(LK) :: assertion; end function
     142             : #endif
     143             :     end interface
     144             : 
     145             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     146             : 
     147             :     interface
     148             : #if     RK5_ENABLED
     149             :         module function test_setCumSum_RK5() result(assertion); logical(LK) :: assertion; end function
     150             : #endif
     151             : #if     RK4_ENABLED
     152             :         module function test_setCumSum_RK4() result(assertion); logical(LK) :: assertion; end function
     153             : #endif
     154             : #if     RK3_ENABLED
     155             :         module function test_setCumSum_RK3() result(assertion); logical(LK) :: assertion; end function
     156             : #endif
     157             : #if     RK2_ENABLED
     158             :         module function test_setCumSum_RK2() result(assertion); logical(LK) :: assertion; end function
     159             : #endif
     160             : #if     RK1_ENABLED
     161             :         module function test_setCumSum_RK1() result(assertion); logical(LK) :: assertion; end function
     162             : #endif
     163             :     end interface
     164             : 
     165             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     166             : 
     167             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     168             : 
     169             : contains
     170             : 
     171             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     172             : 
     173           1 :     subroutine setTest()
     174             : 
     175           1 :         test = test_type(MODULE_NAME)
     176             : 
     177             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     178             : 
     179             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     180             : 
     181             : #if     IK5_ENABLED
     182           1 :         call test%run(test_getCumSum_IK5, SK_"test_getCumSum_IK5")
     183             : #endif
     184             : #if     IK4_ENABLED
     185           1 :         call test%run(test_getCumSum_IK4, SK_"test_getCumSum_IK4")
     186             : #endif
     187             : #if     IK3_ENABLED
     188           1 :         call test%run(test_getCumSum_IK3, SK_"test_getCumSum_IK3")
     189             : #endif
     190             : #if     IK2_ENABLED
     191           1 :         call test%run(test_getCumSum_IK2, SK_"test_getCumSum_IK2")
     192             : #endif
     193             : #if     IK1_ENABLED
     194           1 :         call test%run(test_getCumSum_IK1, SK_"test_getCumSum_IK1")
     195             : #endif
     196             : 
     197             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     198             : 
     199             : #if     CK5_ENABLED
     200             :         call test%run(test_getCumSum_CK5, SK_"test_getCumSum_CK5")
     201             : #endif
     202             : #if     CK4_ENABLED
     203           1 :         call test%run(test_getCumSum_CK4, SK_"test_getCumSum_CK4")
     204             : #endif
     205             : #if     CK3_ENABLED
     206           1 :         call test%run(test_getCumSum_CK3, SK_"test_getCumSum_CK3")
     207             : #endif
     208             : #if     CK2_ENABLED
     209           1 :         call test%run(test_getCumSum_CK2, SK_"test_getCumSum_CK2")
     210             : #endif
     211             : #if     CK1_ENABLED
     212           1 :         call test%run(test_getCumSum_CK1, SK_"test_getCumSum_CK1")
     213             : #endif
     214             : 
     215             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     216             : 
     217             : #if     RK5_ENABLED
     218             :         call test%run(test_getCumSum_RK5, SK_"test_getCumSum_RK5")
     219             : #endif
     220             : #if     RK4_ENABLED
     221           1 :         call test%run(test_getCumSum_RK4, SK_"test_getCumSum_RK4")
     222             : #endif
     223             : #if     RK3_ENABLED
     224           1 :         call test%run(test_getCumSum_RK3, SK_"test_getCumSum_RK3")
     225             : #endif
     226             : #if     RK2_ENABLED
     227           1 :         call test%run(test_getCumSum_RK2, SK_"test_getCumSum_RK2")
     228             : #endif
     229             : #if     RK1_ENABLED
     230           1 :         call test%run(test_getCumSum_RK1, SK_"test_getCumSum_RK1")
     231             : #endif
     232             : 
     233             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     234             : 
     235             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     236             : 
     237             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     238             : 
     239             : #if     IK5_ENABLED
     240           1 :         call test%run(test_setCumSum_IK5, SK_"test_setCumSum_IK5")
     241             : #endif
     242             : #if     IK4_ENABLED
     243           1 :         call test%run(test_setCumSum_IK4, SK_"test_setCumSum_IK4")
     244             : #endif
     245             : #if     IK3_ENABLED
     246           1 :         call test%run(test_setCumSum_IK3, SK_"test_setCumSum_IK3")
     247             : #endif
     248             : #if     IK2_ENABLED
     249           1 :         call test%run(test_setCumSum_IK2, SK_"test_setCumSum_IK2")
     250             : #endif
     251             : #if     IK1_ENABLED
     252           1 :         call test%run(test_setCumSum_IK1, SK_"test_setCumSum_IK1")
     253             : #endif
     254             : 
     255             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     256             : 
     257             : #if     CK5_ENABLED
     258             :         call test%run(test_setCumSum_CK5, SK_"test_setCumSum_CK5")
     259             : #endif
     260             : #if     CK4_ENABLED
     261           1 :         call test%run(test_setCumSum_CK4, SK_"test_setCumSum_CK4")
     262             : #endif
     263             : #if     CK3_ENABLED
     264           1 :         call test%run(test_setCumSum_CK3, SK_"test_setCumSum_CK3")
     265             : #endif
     266             : #if     CK2_ENABLED
     267           1 :         call test%run(test_setCumSum_CK2, SK_"test_setCumSum_CK2")
     268             : #endif
     269             : #if     CK1_ENABLED
     270           1 :         call test%run(test_setCumSum_CK1, SK_"test_setCumSum_CK1")
     271             : #endif
     272             : 
     273             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     274             : 
     275             : #if     RK5_ENABLED
     276             :         call test%run(test_setCumSum_RK5, SK_"test_setCumSum_RK5")
     277             : #endif
     278             : #if     RK4_ENABLED
     279           1 :         call test%run(test_setCumSum_RK4, SK_"test_setCumSum_RK4")
     280             : #endif
     281             : #if     RK3_ENABLED
     282           1 :         call test%run(test_setCumSum_RK3, SK_"test_setCumSum_RK3")
     283             : #endif
     284             : #if     RK2_ENABLED
     285           1 :         call test%run(test_setCumSum_RK2, SK_"test_setCumSum_RK2")
     286             : #endif
     287             : #if     RK1_ENABLED
     288           1 :         call test%run(test_setCumSum_RK1, SK_"test_setCumSum_RK1")
     289             : #endif
     290             : 
     291             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     292             : 
     293             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     294             : 
     295           1 :         call test%summarize()
     296             : 
     297           1 :     end subroutine setTest
     298             : 
     299             : end module test_pm_mathCumSum ! LCOV_EXCL_LINE

ParaMonte: Parallel Monte Carlo and Machine Learning Library 
The Computational Data Science Lab
© Copyright 2012 - 2024