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_arrayRemove](@ref pm_arrayRemove).
19 : !>
20 : !> \todo
21 : !> \phigh The following tests should be extended to include allocatable arrays of arbitrary bounds.
22 : !>
23 : !> \fintest
24 : !>
25 : !> \author
26 : !> \AmirShahmoradi, September 1, 2017, 11:35 PM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
27 :
28 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29 :
30 : module test_pm_arrayRemove
31 :
32 : use pm_arrayRemove
33 : use pm_err, only: err_type
34 : use pm_test, only: test_type, LK
35 : implicit none
36 :
37 : private
38 : public :: setTest
39 : type(test_type) :: test
40 :
41 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 :
43 : interface
44 :
45 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46 :
47 : #if SK5_ENABLED
48 : module function test_setRemoved_D0_D0_SK5 () result(assertion); logical(LK) :: assertion; end function
49 : #endif
50 : #if SK4_ENABLED
51 : module function test_setRemoved_D0_D0_SK4 () result(assertion); logical(LK) :: assertion; end function
52 : #endif
53 : #if SK3_ENABLED
54 : module function test_setRemoved_D0_D0_SK3 () result(assertion); logical(LK) :: assertion; end function
55 : #endif
56 : #if SK2_ENABLED
57 : module function test_setRemoved_D0_D0_SK2 () result(assertion); logical(LK) :: assertion; end function
58 : #endif
59 : #if SK1_ENABLED
60 : module function test_setRemoved_D0_D0_SK1 () result(assertion); logical(LK) :: assertion; end function
61 : #endif
62 :
63 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64 :
65 : #if SK5_ENABLED
66 : module function test_setRemoved_D1_D0_SK5 () result(assertion); logical(LK) :: assertion; end function
67 : module function test_setRemoved_D1_D1_SK5 () result(assertion); logical(LK) :: assertion; end function
68 : #endif
69 : #if SK4_ENABLED
70 : module function test_setRemoved_D1_D0_SK4 () result(assertion); logical(LK) :: assertion; end function
71 : module function test_setRemoved_D1_D1_SK4 () result(assertion); logical(LK) :: assertion; end function
72 : #endif
73 : #if SK3_ENABLED
74 : module function test_setRemoved_D1_D0_SK3 () result(assertion); logical(LK) :: assertion; end function
75 : module function test_setRemoved_D1_D1_SK3 () result(assertion); logical(LK) :: assertion; end function
76 : #endif
77 : #if SK2_ENABLED
78 : module function test_setRemoved_D1_D0_SK2 () result(assertion); logical(LK) :: assertion; end function
79 : module function test_setRemoved_D1_D1_SK2 () result(assertion); logical(LK) :: assertion; end function
80 : #endif
81 : #if SK1_ENABLED
82 : module function test_setRemoved_D1_D0_SK1 () result(assertion); logical(LK) :: assertion; end function
83 : module function test_setRemoved_D1_D1_SK1 () result(assertion); logical(LK) :: assertion; end function
84 : #endif
85 :
86 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 :
88 : #if IK5_ENABLED
89 : module function test_setRemoved_D1_D0_IK5 () result(assertion); logical(LK) :: assertion; end function
90 : module function test_setRemoved_D1_D1_IK5 () result(assertion); logical(LK) :: assertion; end function
91 : #endif
92 : #if IK4_ENABLED
93 : module function test_setRemoved_D1_D0_IK4 () result(assertion); logical(LK) :: assertion; end function
94 : module function test_setRemoved_D1_D1_IK4 () result(assertion); logical(LK) :: assertion; end function
95 : #endif
96 : #if IK3_ENABLED
97 : module function test_setRemoved_D1_D0_IK3 () result(assertion); logical(LK) :: assertion; end function
98 : module function test_setRemoved_D1_D1_IK3 () result(assertion); logical(LK) :: assertion; end function
99 : #endif
100 : #if IK2_ENABLED
101 : module function test_setRemoved_D1_D0_IK2 () result(assertion); logical(LK) :: assertion; end function
102 : module function test_setRemoved_D1_D1_IK2 () result(assertion); logical(LK) :: assertion; end function
103 : #endif
104 : #if IK1_ENABLED
105 : module function test_setRemoved_D1_D0_IK1 () result(assertion); logical(LK) :: assertion; end function
106 : module function test_setRemoved_D1_D1_IK1 () result(assertion); logical(LK) :: assertion; end function
107 : #endif
108 :
109 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110 :
111 : #if LK5_ENABLED
112 : module function test_setRemoved_D1_D0_LK5 () result(assertion); logical(LK) :: assertion; end function
113 : module function test_setRemoved_D1_D1_LK5 () result(assertion); logical(LK) :: assertion; end function
114 : #endif
115 : #if LK4_ENABLED
116 : module function test_setRemoved_D1_D0_LK4 () result(assertion); logical(LK) :: assertion; end function
117 : module function test_setRemoved_D1_D1_LK4 () result(assertion); logical(LK) :: assertion; end function
118 : #endif
119 : #if LK3_ENABLED
120 : module function test_setRemoved_D1_D0_LK3 () result(assertion); logical(LK) :: assertion; end function
121 : module function test_setRemoved_D1_D1_LK3 () result(assertion); logical(LK) :: assertion; end function
122 : #endif
123 : #if LK2_ENABLED
124 : module function test_setRemoved_D1_D0_LK2 () result(assertion); logical(LK) :: assertion; end function
125 : module function test_setRemoved_D1_D1_LK2 () result(assertion); logical(LK) :: assertion; end function
126 : #endif
127 : #if LK1_ENABLED
128 : module function test_setRemoved_D1_D0_LK1 () result(assertion); logical(LK) :: assertion; end function
129 : module function test_setRemoved_D1_D1_LK1 () result(assertion); logical(LK) :: assertion; end function
130 : #endif
131 :
132 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133 :
134 : #if CK5_ENABLED
135 : module function test_setRemoved_D1_D0_CK5 () result(assertion); logical(LK) :: assertion; end function
136 : module function test_setRemoved_D1_D1_CK5 () result(assertion); logical(LK) :: assertion; end function
137 : #endif
138 : #if CK4_ENABLED
139 : module function test_setRemoved_D1_D0_CK4 () result(assertion); logical(LK) :: assertion; end function
140 : module function test_setRemoved_D1_D1_CK4 () result(assertion); logical(LK) :: assertion; end function
141 : #endif
142 : #if CK3_ENABLED
143 : module function test_setRemoved_D1_D0_CK3 () result(assertion); logical(LK) :: assertion; end function
144 : module function test_setRemoved_D1_D1_CK3 () result(assertion); logical(LK) :: assertion; end function
145 : #endif
146 : #if CK2_ENABLED
147 : module function test_setRemoved_D1_D0_CK2 () result(assertion); logical(LK) :: assertion; end function
148 : module function test_setRemoved_D1_D1_CK2 () result(assertion); logical(LK) :: assertion; end function
149 : #endif
150 : #if CK1_ENABLED
151 : module function test_setRemoved_D1_D0_CK1 () result(assertion); logical(LK) :: assertion; end function
152 : module function test_setRemoved_D1_D1_CK1 () result(assertion); logical(LK) :: assertion; end function
153 : #endif
154 :
155 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 :
157 : #if RK5_ENABLED
158 : module function test_setRemoved_D1_D0_RK5 () result(assertion); logical(LK) :: assertion; end function
159 : module function test_setRemoved_D1_D1_RK5 () result(assertion); logical(LK) :: assertion; end function
160 : #endif
161 : #if RK4_ENABLED
162 : module function test_setRemoved_D1_D0_RK4 () result(assertion); logical(LK) :: assertion; end function
163 : module function test_setRemoved_D1_D1_RK4 () result(assertion); logical(LK) :: assertion; end function
164 : #endif
165 : #if RK3_ENABLED
166 : module function test_setRemoved_D1_D0_RK3 () result(assertion); logical(LK) :: assertion; end function
167 : module function test_setRemoved_D1_D1_RK3 () result(assertion); logical(LK) :: assertion; end function
168 : #endif
169 : #if RK2_ENABLED
170 : module function test_setRemoved_D1_D0_RK2 () result(assertion); logical(LK) :: assertion; end function
171 : module function test_setRemoved_D1_D1_RK2 () result(assertion); logical(LK) :: assertion; end function
172 : #endif
173 : #if RK1_ENABLED
174 : module function test_setRemoved_D1_D0_RK1 () result(assertion); logical(LK) :: assertion; end function
175 : module function test_setRemoved_D1_D1_RK1 () result(assertion); logical(LK) :: assertion; end function
176 : #endif
177 :
178 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
179 :
180 : end interface
181 :
182 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183 :
184 : contains
185 :
186 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187 :
188 1 : subroutine setTest()
189 :
190 : implicit none
191 :
192 1 : test = test_type(MODULE_NAME)
193 :
194 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 :
196 : #if SK5_ENABLED
197 : call test%run(test_setRemoved_D0_D0_SK5, SK_"test_setRemoved_D0_D0_SK5")
198 : #endif
199 : #if SK4_ENABLED
200 : call test%run(test_setRemoved_D0_D0_SK4, SK_"test_setRemoved_D0_D0_SK4")
201 : #endif
202 : #if SK3_ENABLED
203 : call test%run(test_setRemoved_D0_D0_SK3, SK_"test_setRemoved_D0_D0_SK3")
204 : #endif
205 : #if SK2_ENABLED
206 : call test%run(test_setRemoved_D0_D0_SK2, SK_"test_setRemoved_D0_D0_SK2")
207 : #endif
208 : #if SK1_ENABLED
209 1 : call test%run(test_setRemoved_D0_D0_SK1, SK_"test_setRemoved_D0_D0_SK1")
210 : #endif
211 :
212 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213 :
214 : #if SK5_ENABLED
215 : call test%run(test_setRemoved_D1_D0_SK5, SK_"test_setRemoved_D1_D0_SK5")
216 : call test%run(test_setRemoved_D1_D1_SK5, SK_"test_setRemoved_D1_D1_SK5")
217 : #endif
218 : #if SK4_ENABLED
219 : call test%run(test_setRemoved_D1_D0_SK4, SK_"test_setRemoved_D1_D0_SK4")
220 : call test%run(test_setRemoved_D1_D1_SK4, SK_"test_setRemoved_D1_D1_SK4")
221 : #endif
222 : #if SK3_ENABLED
223 : call test%run(test_setRemoved_D1_D0_SK3, SK_"test_setRemoved_D1_D0_SK3")
224 : call test%run(test_setRemoved_D1_D1_SK3, SK_"test_setRemoved_D1_D1_SK3")
225 : #endif
226 : #if SK2_ENABLED
227 : call test%run(test_setRemoved_D1_D0_SK2, SK_"test_setRemoved_D1_D0_SK2")
228 : call test%run(test_setRemoved_D1_D1_SK2, SK_"test_setRemoved_D1_D1_SK2")
229 : #endif
230 : #if SK1_ENABLED
231 1 : call test%run(test_setRemoved_D1_D0_SK1, SK_"test_setRemoved_D1_D0_SK1")
232 1 : call test%run(test_setRemoved_D1_D1_SK1, SK_"test_setRemoved_D1_D1_SK1")
233 : #endif
234 :
235 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
236 :
237 : #if IK5_ENABLED
238 1 : call test%run(test_setRemoved_D1_D0_IK5, SK_"test_setRemoved_D1_D0_IK5")
239 1 : call test%run(test_setRemoved_D1_D1_IK5, SK_"test_setRemoved_D1_D1_IK5")
240 : #endif
241 : #if IK4_ENABLED
242 1 : call test%run(test_setRemoved_D1_D0_IK4, SK_"test_setRemoved_D1_D0_IK4")
243 1 : call test%run(test_setRemoved_D1_D1_IK4, SK_"test_setRemoved_D1_D1_IK4")
244 : #endif
245 : #if IK3_ENABLED
246 1 : call test%run(test_setRemoved_D1_D0_IK3, SK_"test_setRemoved_D1_D0_IK3")
247 1 : call test%run(test_setRemoved_D1_D1_IK3, SK_"test_setRemoved_D1_D1_IK3")
248 : #endif
249 : #if IK2_ENABLED
250 1 : call test%run(test_setRemoved_D1_D0_IK2, SK_"test_setRemoved_D1_D0_IK2")
251 1 : call test%run(test_setRemoved_D1_D1_IK2, SK_"test_setRemoved_D1_D1_IK2")
252 : #endif
253 : #if IK1_ENABLED
254 1 : call test%run(test_setRemoved_D1_D0_IK1, SK_"test_setRemoved_D1_D0_IK1")
255 1 : call test%run(test_setRemoved_D1_D1_IK1, SK_"test_setRemoved_D1_D1_IK1")
256 : #endif
257 :
258 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
259 :
260 : #if LK5_ENABLED
261 1 : call test%run(test_setRemoved_D1_D0_LK5, SK_"test_setRemoved_D1_D0_LK5")
262 1 : call test%run(test_setRemoved_D1_D1_LK5, SK_"test_setRemoved_D1_D1_LK5")
263 : #endif
264 : #if LK4_ENABLED
265 1 : call test%run(test_setRemoved_D1_D0_LK4, SK_"test_setRemoved_D1_D0_LK4")
266 1 : call test%run(test_setRemoved_D1_D1_LK4, SK_"test_setRemoved_D1_D1_LK4")
267 : #endif
268 : #if LK3_ENABLED
269 1 : call test%run(test_setRemoved_D1_D0_LK3, SK_"test_setRemoved_D1_D0_LK3")
270 1 : call test%run(test_setRemoved_D1_D1_LK3, SK_"test_setRemoved_D1_D1_LK3")
271 : #endif
272 : #if LK2_ENABLED
273 1 : call test%run(test_setRemoved_D1_D0_LK2, SK_"test_setRemoved_D1_D0_LK2")
274 1 : call test%run(test_setRemoved_D1_D1_LK2, SK_"test_setRemoved_D1_D1_LK2")
275 : #endif
276 : #if LK1_ENABLED
277 1 : call test%run(test_setRemoved_D1_D0_LK1, SK_"test_setRemoved_D1_D0_LK1")
278 1 : call test%run(test_setRemoved_D1_D1_LK1, SK_"test_setRemoved_D1_D1_LK1")
279 : #endif
280 :
281 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
282 :
283 : #if CK5_ENABLED
284 : call test%run(test_setRemoved_D1_D0_CK5, SK_"test_setRemoved_D1_D0_CK5")
285 : call test%run(test_setRemoved_D1_D1_CK5, SK_"test_setRemoved_D1_D1_CK5")
286 : #endif
287 : #if CK4_ENABLED
288 1 : call test%run(test_setRemoved_D1_D0_CK4, SK_"test_setRemoved_D1_D0_CK4")
289 1 : call test%run(test_setRemoved_D1_D1_CK4, SK_"test_setRemoved_D1_D1_CK4")
290 : #endif
291 : #if CK3_ENABLED
292 1 : call test%run(test_setRemoved_D1_D0_CK3, SK_"test_setRemoved_D1_D0_CK3")
293 1 : call test%run(test_setRemoved_D1_D1_CK3, SK_"test_setRemoved_D1_D1_CK3")
294 : #endif
295 : #if CK2_ENABLED
296 1 : call test%run(test_setRemoved_D1_D0_CK2, SK_"test_setRemoved_D1_D0_CK2")
297 1 : call test%run(test_setRemoved_D1_D1_CK2, SK_"test_setRemoved_D1_D1_CK2")
298 : #endif
299 : #if CK1_ENABLED
300 1 : call test%run(test_setRemoved_D1_D0_CK1, SK_"test_setRemoved_D1_D0_CK1")
301 1 : call test%run(test_setRemoved_D1_D1_CK1, SK_"test_setRemoved_D1_D1_CK1")
302 : #endif
303 :
304 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
305 :
306 : #if RK5_ENABLED
307 : call test%run(test_setRemoved_D1_D0_RK5, SK_"test_setRemoved_D1_D0_RK5")
308 : call test%run(test_setRemoved_D1_D1_RK5, SK_"test_setRemoved_D1_D1_RK5")
309 : #endif
310 : #if RK4_ENABLED
311 1 : call test%run(test_setRemoved_D1_D0_RK4, SK_"test_setRemoved_D1_D0_RK4")
312 1 : call test%run(test_setRemoved_D1_D1_RK4, SK_"test_setRemoved_D1_D1_RK4")
313 : #endif
314 : #if RK3_ENABLED
315 1 : call test%run(test_setRemoved_D1_D0_RK3, SK_"test_setRemoved_D1_D0_RK3")
316 1 : call test%run(test_setRemoved_D1_D1_RK3, SK_"test_setRemoved_D1_D1_RK3")
317 : #endif
318 : #if RK2_ENABLED
319 1 : call test%run(test_setRemoved_D1_D0_RK2, SK_"test_setRemoved_D1_D0_RK2")
320 1 : call test%run(test_setRemoved_D1_D1_RK2, SK_"test_setRemoved_D1_D1_RK2")
321 : #endif
322 : #if RK1_ENABLED
323 1 : call test%run(test_setRemoved_D1_D0_RK1, SK_"test_setRemoved_D1_D0_RK1")
324 1 : call test%run(test_setRemoved_D1_D1_RK1, SK_"test_setRemoved_D1_D1_RK1")
325 : #endif
326 :
327 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
328 :
329 1 : call test%summarize()
330 :
331 1 : end subroutine setTest
332 :
333 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
334 :
335 : end module test_pm_arrayRemove ! LCOV_EXCL_LINE
|