ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
test_pm_mathMinMax.F90
Go to the documentation of this file.
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
19
21
22 use pm_mathMinMax ! LCOV_EXCL_LINE
23 use pm_err, only: err_type
24 use pm_test, only: test_type, LK
25
26 implicit none
27
28 private
29 public :: setTest
30 type(test_type) :: test
31
32 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33
34 interface
35#if CK3_ENABLED
36 module function test_getMinMax_CK3_1() result(assertion); logical(LK) :: assertion; end function
37#endif
38#if CK2_ENABLED
39 module function test_getMinMax_CK2_1() result(assertion); logical(LK) :: assertion; end function
40#endif
41#if CK1_ENABLED
42 module function test_getMinMax_CK1_1() result(assertion); logical(LK) :: assertion; end function
43#endif
44 end interface
45
46 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
48 interface
49#if RK3_ENABLED
50 module function test_getMinMax_RK3_1() result(assertion); logical(LK) :: assertion; end function
51#endif
52#if RK2_ENABLED
53 module function test_getMinMax_RK2_1() result(assertion); logical(LK) :: assertion; end function
54#endif
55#if RK1_ENABLED
56 module function test_getMinMax_RK1_1() result(assertion); logical(LK) :: assertion; end function
57#endif
58 end interface
59
60 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61
62 interface
63#if IK4_ENABLED
64 module function test_getMinMax_IK4_1() result(assertion); logical(LK) :: assertion; end function
65#endif
66#if IK3_ENABLED
67 module function test_getMinMax_IK3_1() result(assertion); logical(LK) :: assertion; end function
68#endif
69#if IK2_ENABLED
70 module function test_getMinMax_IK2_1() result(assertion); logical(LK) :: assertion; end function
71#endif
72#if IK1_ENABLED
73 module function test_getMinMax_IK1_1() result(assertion); logical(LK) :: assertion; end function
74#endif
75 end interface
76
77 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
78
79 interface
80 module function test_getMinMax_SK_1() result(assertion); logical(LK) :: assertion; end function
81 module function test_getMinMax_SSK_1() result(assertion); logical(LK) :: assertion; end function
82 end interface
83
84 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
85
86 interface
87#if CK3_ENABLED
88 module function test_setMinMax_CK3_1() result(assertion); logical(LK) :: assertion; end function
89#endif
90#if CK2_ENABLED
91 module function test_setMinMax_CK2_1() result(assertion); logical(LK) :: assertion; end function
92#endif
93#if CK1_ENABLED
94 module function test_setMinMax_CK1_1() result(assertion); logical(LK) :: assertion; end function
95#endif
96 end interface
97
98 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99
100 interface
101#if RK3_ENABLED
102 module function test_setMinMax_RK3_1() result(assertion); logical(LK) :: assertion; end function
103#endif
104#if RK2_ENABLED
105 module function test_setMinMax_RK2_1() result(assertion); logical(LK) :: assertion; end function
106#endif
107#if RK1_ENABLED
108 module function test_setMinMax_RK1_1() result(assertion); logical(LK) :: assertion; end function
109#endif
110 end interface
111
112 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113
114 interface
115#if IK4_ENABLED
116 module function test_setMinMax_IK4_1() result(assertion); logical(LK) :: assertion; end function
117#endif
118#if IK3_ENABLED
119 module function test_setMinMax_IK3_1() result(assertion); logical(LK) :: assertion; end function
120#endif
121#if IK2_ENABLED
122 module function test_setMinMax_IK2_1() result(assertion); logical(LK) :: assertion; end function
123#endif
124#if IK1_ENABLED
125 module function test_setMinMax_IK1_1() result(assertion); logical(LK) :: assertion; end function
126#endif
127 end interface
128
129 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130
131 interface
132 module function test_setMinMax_SK_1() result(assertion); logical(LK) :: assertion; end function
133 module function test_setMinMax_SSK_1() result(assertion); logical(LK) :: assertion; end function
134 end interface
135
136 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
137
138contains
139
140 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
141
142 subroutine setTest()
143
145
146 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
148#if CK3_ENABLED
149 call test%run(test_getMinMax_CK3_1, SK_"test_getMinMax_CK3_1")
150#endif
151#if CK2_ENABLED
152 call test%run(test_getMinMax_CK2_1, SK_"test_getMinMax_CK2_1")
153#endif
154#if CK1_ENABLED
155 call test%run(test_getMinMax_CK1_1, SK_"test_getMinMax_CK1_1")
156#endif
157
158 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159
160#if RK3_ENABLED
161 call test%run(test_getMinMax_RK3_1, SK_"test_getMinMax_RK3_1")
162#endif
163#if RK2_ENABLED
164 call test%run(test_getMinMax_RK2_1, SK_"test_getMinMax_RK2_1")
165#endif
166#if RK1_ENABLED
167 call test%run(test_getMinMax_RK1_1, SK_"test_getMinMax_RK1_1")
168#endif
169
170 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171
172#if IK4_ENABLED
173 call test%run(test_getMinMax_IK4_1, SK_"test_getMinMax_IK4_1")
174#endif
175#if IK3_ENABLED
176 call test%run(test_getMinMax_IK3_1, SK_"test_getMinMax_IK3_1")
177#endif
178#if IK2_ENABLED
179 call test%run(test_getMinMax_IK2_1, SK_"test_getMinMax_IK2_1")
180#endif
181#if IK1_ENABLED
182 call test%run(test_getMinMax_IK1_1, SK_"test_getMinMax_IK1_1")
183#endif
184
185 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186
187 call test%run(test_getMinMax_SK_1, SK_"test_getMinMax_SK_1")
188 call test%run(test_getMinMax_SSK_1, SK_"test_getMinMax_SSK_1")
189
190 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191
192#if CK3_ENABLED
193 call test%run(test_setMinMax_CK3_1, SK_"test_setMinMax_CK3_1")
194#endif
195#if CK2_ENABLED
196 call test%run(test_setMinMax_CK2_1, SK_"test_setMinMax_CK2_1")
197#endif
198#if CK1_ENABLED
199 call test%run(test_setMinMax_CK1_1, SK_"test_setMinMax_CK1_1")
200#endif
201
202 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
203
204#if RK3_ENABLED
205 call test%run(test_setMinMax_RK3_1, SK_"test_setMinMax_RK3_1")
206#endif
207#if RK2_ENABLED
208 call test%run(test_setMinMax_RK2_1, SK_"test_setMinMax_RK2_1")
209#endif
210#if RK1_ENABLED
211 call test%run(test_setMinMax_RK1_1, SK_"test_setMinMax_RK1_1")
212#endif
213
214 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
215
216#if IK4_ENABLED
217 call test%run(test_setMinMax_IK4_1, SK_"test_setMinMax_IK4_1")
218#endif
219#if IK3_ENABLED
220 call test%run(test_setMinMax_IK3_1, SK_"test_setMinMax_IK3_1")
221#endif
222#if IK2_ENABLED
223 call test%run(test_setMinMax_IK2_1, SK_"test_setMinMax_IK2_1")
224#endif
225#if IK1_ENABLED
226 call test%run(test_setMinMax_IK1_1, SK_"test_setMinMax_IK1_1")
227#endif
228
229 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
230
231 call test%run(test_setMinMax_SK_1, SK_"test_setMinMax_SK_1")
232 call test%run(test_setMinMax_SSK_1, SK_"test_setMinMax_SSK_1")
233
234 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
235
236 call test%summarize()
237
238 end subroutine setTest
239
240 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241
242end module test_pm_mathMinMax ! LCOV_EXCL_LINE
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
character(*, SK), parameter MODULE_NAME
Definition: pm_err.F90:58
This module contains procedures and generic interfaces for finding the minimum and maximum of two inp...
This module contains a simple unit-testing framework for the Fortran libraries, including the ParaMon...
Definition: pm_test.F90:42
This module contains tests of the module pm_mathMinMax.
This is the derived type for generating objects to gracefully and verbosely handle runtime unexpected...
Definition: pm_err.F90:157
This is the derived type test_type for generating objects that facilitate testing of a series of proc...
Definition: pm_test.F90:209