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_arrayReverse](@ref pm_arrayReverse).
19 : !>
20 : !> \author
21 : !> \AmirShahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
22 :
23 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24 :
25 : module test_pm_arrayReverse
26 :
27 : use pm_arrayReverse
28 : use pm_test, only: test_type, LK
29 : use pm_kind, only: IK, RK
30 : implicit none
31 :
32 : private
33 : public :: setTest
34 : type(test_type) :: test
35 :
36 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 :
38 : interface
39 :
40 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 :
42 : #if SK5_ENABLED
43 : module function test_getReversed_D0_SK5_1() result(assertion); logical(LK) :: assertion; end function
44 : module function test_setReversed_D0_SK5_1() result(assertion); logical(LK) :: assertion; end function
45 : #endif
46 : #if SK4_ENABLED
47 : module function test_getReversed_D0_SK4_1() result(assertion); logical(LK) :: assertion; end function
48 : module function test_setReversed_D0_SK4_1() result(assertion); logical(LK) :: assertion; end function
49 : #endif
50 : #if SK3_ENABLED
51 : module function test_getReversed_D0_SK3_1() result(assertion); logical(LK) :: assertion; end function
52 : module function test_setReversed_D0_SK3_1() result(assertion); logical(LK) :: assertion; end function
53 : #endif
54 : #if SK2_ENABLED
55 : module function test_getReversed_D0_SK2_1() result(assertion); logical(LK) :: assertion; end function
56 : module function test_setReversed_D0_SK2_1() result(assertion); logical(LK) :: assertion; end function
57 : #endif
58 : #if SK1_ENABLED
59 : module function test_getReversed_D0_SK1_1() result(assertion); logical(LK) :: assertion; end function
60 : module function test_setReversed_D0_SK1_1() result(assertion); logical(LK) :: assertion; end function
61 : #endif
62 :
63 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64 :
65 : #if SK5_ENABLED
66 : module function test_getReversed_D1_SK5_1() result(assertion); logical(LK) :: assertion; end function
67 : module function test_setReversed_D1_SK5_1() result(assertion); logical(LK) :: assertion; end function
68 : #endif
69 : #if SK4_ENABLED
70 : module function test_getReversed_D1_SK4_1() result(assertion); logical(LK) :: assertion; end function
71 : module function test_setReversed_D1_SK4_1() result(assertion); logical(LK) :: assertion; end function
72 : #endif
73 : #if SK3_ENABLED
74 : module function test_getReversed_D1_SK3_1() result(assertion); logical(LK) :: assertion; end function
75 : module function test_setReversed_D1_SK3_1() result(assertion); logical(LK) :: assertion; end function
76 : #endif
77 : #if SK2_ENABLED
78 : module function test_getReversed_D1_SK2_1() result(assertion); logical(LK) :: assertion; end function
79 : module function test_setReversed_D1_SK2_1() result(assertion); logical(LK) :: assertion; end function
80 : #endif
81 : #if SK1_ENABLED
82 : module function test_getReversed_D1_SK1_1() result(assertion); logical(LK) :: assertion; end function
83 : module function test_setReversed_D1_SK1_1() result(assertion); logical(LK) :: assertion; end function
84 : #endif
85 :
86 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 :
88 : #if IK5_ENABLED
89 : module function test_getReversed_D1_IK5_1() result(assertion); logical(LK) :: assertion; end function
90 : module function test_setReversed_D1_IK5_1() result(assertion); logical(LK) :: assertion; end function
91 : #endif
92 : #if IK4_ENABLED
93 : module function test_getReversed_D1_IK4_1() result(assertion); logical(LK) :: assertion; end function
94 : module function test_setReversed_D1_IK4_1() result(assertion); logical(LK) :: assertion; end function
95 : #endif
96 : #if IK3_ENABLED
97 : module function test_getReversed_D1_IK3_1() result(assertion); logical(LK) :: assertion; end function
98 : module function test_setReversed_D1_IK3_1() result(assertion); logical(LK) :: assertion; end function
99 : #endif
100 : #if IK2_ENABLED
101 : module function test_getReversed_D1_IK2_1() result(assertion); logical(LK) :: assertion; end function
102 : module function test_setReversed_D1_IK2_1() result(assertion); logical(LK) :: assertion; end function
103 : #endif
104 : #if IK1_ENABLED
105 : module function test_getReversed_D1_IK1_1() result(assertion); logical(LK) :: assertion; end function
106 : module function test_setReversed_D1_IK1_1() result(assertion); logical(LK) :: assertion; end function
107 : #endif
108 :
109 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110 :
111 : #if LK5_ENABLED
112 : module function test_getReversed_D1_LK5_1() result(assertion); logical(LK) :: assertion; end function
113 : module function test_setReversed_D1_LK5_1() result(assertion); logical(LK) :: assertion; end function
114 : #endif
115 : #if LK4_ENABLED
116 : module function test_getReversed_D1_LK4_1() result(assertion); logical(LK) :: assertion; end function
117 : module function test_setReversed_D1_LK4_1() result(assertion); logical(LK) :: assertion; end function
118 : #endif
119 : #if LK3_ENABLED
120 : module function test_getReversed_D1_LK3_1() result(assertion); logical(LK) :: assertion; end function
121 : module function test_setReversed_D1_LK3_1() result(assertion); logical(LK) :: assertion; end function
122 : #endif
123 : #if LK2_ENABLED
124 : module function test_getReversed_D1_LK2_1() result(assertion); logical(LK) :: assertion; end function
125 : module function test_setReversed_D1_LK2_1() result(assertion); logical(LK) :: assertion; end function
126 : #endif
127 : #if LK1_ENABLED
128 : module function test_getReversed_D1_LK1_1() result(assertion); logical(LK) :: assertion; end function
129 : module function test_setReversed_D1_LK1_1() result(assertion); logical(LK) :: assertion; end function
130 : #endif
131 :
132 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133 :
134 : #if CK5_ENABLED
135 : module function test_getReversed_D1_CK5_1() result(assertion); logical(LK) :: assertion; end function
136 : module function test_setReversed_D1_CK5_1() result(assertion); logical(LK) :: assertion; end function
137 : #endif
138 : #if CK4_ENABLED
139 : module function test_getReversed_D1_CK4_1() result(assertion); logical(LK) :: assertion; end function
140 : module function test_setReversed_D1_CK4_1() result(assertion); logical(LK) :: assertion; end function
141 : #endif
142 : #if CK3_ENABLED
143 : module function test_getReversed_D1_CK3_1() result(assertion); logical(LK) :: assertion; end function
144 : module function test_setReversed_D1_CK3_1() result(assertion); logical(LK) :: assertion; end function
145 : #endif
146 : #if CK2_ENABLED
147 : module function test_getReversed_D1_CK2_1() result(assertion); logical(LK) :: assertion; end function
148 : module function test_setReversed_D1_CK2_1() result(assertion); logical(LK) :: assertion; end function
149 : #endif
150 : #if CK1_ENABLED
151 : module function test_getReversed_D1_CK1_1() result(assertion); logical(LK) :: assertion; end function
152 : module function test_setReversed_D1_CK1_1() result(assertion); logical(LK) :: assertion; end function
153 : #endif
154 :
155 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 :
157 : #if RK5_ENABLED
158 : module function test_getReversed_D1_RK5_1() result(assertion); logical(LK) :: assertion; end function
159 : module function test_setReversed_D1_RK5_1() result(assertion); logical(LK) :: assertion; end function
160 : #endif
161 : #if RK4_ENABLED
162 : module function test_getReversed_D1_RK4_1() result(assertion); logical(LK) :: assertion; end function
163 : module function test_setReversed_D1_RK4_1() result(assertion); logical(LK) :: assertion; end function
164 : #endif
165 : #if RK3_ENABLED
166 : module function test_getReversed_D1_RK3_1() result(assertion); logical(LK) :: assertion; end function
167 : module function test_setReversed_D1_RK3_1() result(assertion); logical(LK) :: assertion; end function
168 : #endif
169 : #if RK2_ENABLED
170 : module function test_getReversed_D1_RK2_1() result(assertion); logical(LK) :: assertion; end function
171 : module function test_setReversed_D1_RK2_1() result(assertion); logical(LK) :: assertion; end function
172 : #endif
173 : #if RK1_ENABLED
174 : module function test_getReversed_D1_RK1_1() result(assertion); logical(LK) :: assertion; end function
175 : module function test_setReversed_D1_RK1_1() 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 1 : test = test_type(MODULE_NAME)
191 :
192 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
193 :
194 : #if SK5_ENABLED
195 : call test%run(test_getReversed_D0_SK5_1, SK_"test_getReversed_D0_SK5_1")
196 : call test%run(test_setReversed_D0_SK5_1, SK_"test_setReversed_D0_SK5_1")
197 : #endif
198 : #if SK4_ENABLED
199 : call test%run(test_getReversed_D0_SK4_1, SK_"test_getReversed_D0_SK4_1")
200 : call test%run(test_setReversed_D0_SK4_1, SK_"test_setReversed_D0_SK4_1")
201 : #endif
202 : #if SK3_ENABLED
203 : call test%run(test_getReversed_D0_SK3_1, SK_"test_getReversed_D0_SK3_1")
204 : call test%run(test_setReversed_D0_SK3_1, SK_"test_setReversed_D0_SK3_1")
205 : #endif
206 : #if SK2_ENABLED
207 : call test%run(test_getReversed_D0_SK2_1, SK_"test_getReversed_D0_SK2_1")
208 : call test%run(test_setReversed_D0_SK2_1, SK_"test_setReversed_D0_SK2_1")
209 : #endif
210 : #if SK1_ENABLED
211 1 : call test%run(test_getReversed_D0_SK1_1 , SK_"test_getReversed_D0_SK1_1")
212 1 : call test%run(test_setReversed_D0_SK1_1 , SK_"test_setReversed_D0_SK1_1")
213 : #endif
214 :
215 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
216 :
217 : #if SK5_ENABLED
218 : call test%run(test_getReversed_D1_SK5_1, SK_"test_getReversed_D1_SK5_1")
219 : call test%run(test_setReversed_D1_SK5_1, SK_"test_setReversed_D1_SK5_1")
220 : #endif
221 : #if SK4_ENABLED
222 : call test%run(test_getReversed_D1_SK4_1, SK_"test_getReversed_D1_SK4_1")
223 : call test%run(test_setReversed_D1_SK4_1, SK_"test_setReversed_D1_SK4_1")
224 : #endif
225 : #if SK3_ENABLED
226 : call test%run(test_getReversed_D1_SK3_1, SK_"test_getReversed_D1_SK3_1")
227 : call test%run(test_setReversed_D1_SK3_1, SK_"test_setReversed_D1_SK3_1")
228 : #endif
229 : #if SK2_ENABLED
230 : call test%run(test_getReversed_D1_SK2_1, SK_"test_getReversed_D1_SK2_1")
231 : call test%run(test_setReversed_D1_SK2_1, SK_"test_setReversed_D1_SK2_1")
232 : #endif
233 : #if SK1_ENABLED
234 1 : call test%run(test_getReversed_D1_SK1_1 , SK_"test_getReversed_D1_SK1_1")
235 1 : call test%run(test_setReversed_D1_SK1_1 , SK_"test_setReversed_D1_SK1_1")
236 : #endif
237 :
238 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239 :
240 : #if IK5_ENABLED
241 1 : call test%run(test_getReversed_D1_IK5_1, SK_"test_getReversed_D1_IK5_1")
242 1 : call test%run(test_setReversed_D1_IK5_1, SK_"test_setReversed_D1_IK5_1")
243 : #endif
244 : #if IK4_ENABLED
245 1 : call test%run(test_getReversed_D1_IK4_1, SK_"test_getReversed_D1_IK4_1")
246 1 : call test%run(test_setReversed_D1_IK4_1, SK_"test_setReversed_D1_IK4_1")
247 : #endif
248 : #if IK3_ENABLED
249 1 : call test%run(test_getReversed_D1_IK3_1, SK_"test_getReversed_D1_IK3_1")
250 1 : call test%run(test_setReversed_D1_IK3_1, SK_"test_setReversed_D1_IK3_1")
251 : #endif
252 : #if IK2_ENABLED
253 1 : call test%run(test_getReversed_D1_IK2_1, SK_"test_getReversed_D1_IK2_1")
254 1 : call test%run(test_setReversed_D1_IK2_1, SK_"test_setReversed_D1_IK2_1")
255 : #endif
256 : #if IK1_ENABLED
257 1 : call test%run(test_getReversed_D1_IK1_1 , SK_"test_getReversed_D1_IK1_1")
258 1 : call test%run(test_setReversed_D1_IK1_1 , SK_"test_setReversed_D1_IK1_1")
259 : #endif
260 :
261 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
262 :
263 : #if LK5_ENABLED
264 1 : call test%run(test_getReversed_D1_LK5_1, SK_"test_getReversed_D1_LK5_1")
265 1 : call test%run(test_setReversed_D1_LK5_1, SK_"test_setReversed_D1_LK5_1")
266 : #endif
267 : #if LK4_ENABLED
268 1 : call test%run(test_getReversed_D1_LK4_1, SK_"test_getReversed_D1_LK4_1")
269 1 : call test%run(test_setReversed_D1_LK4_1, SK_"test_setReversed_D1_LK4_1")
270 : #endif
271 : #if LK3_ENABLED
272 1 : call test%run(test_getReversed_D1_LK3_1, SK_"test_getReversed_D1_LK3_1")
273 1 : call test%run(test_setReversed_D1_LK3_1, SK_"test_setReversed_D1_LK3_1")
274 : #endif
275 : #if LK2_ENABLED
276 1 : call test%run(test_getReversed_D1_LK2_1, SK_"test_getReversed_D1_LK2_1")
277 1 : call test%run(test_setReversed_D1_LK2_1, SK_"test_setReversed_D1_LK2_1")
278 : #endif
279 : #if LK1_ENABLED
280 1 : call test%run(test_getReversed_D1_LK1_1 , SK_"test_getReversed_D1_LK1_1")
281 1 : call test%run(test_setReversed_D1_LK1_1 , SK_"test_setReversed_D1_LK1_1")
282 : #endif
283 :
284 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
285 :
286 : #if CK5_ENABLED
287 : call test%run(test_getReversed_D1_CK5_1, SK_"test_getReversed_D1_CK5_1")
288 : call test%run(test_setReversed_D1_CK5_1, SK_"test_setReversed_D1_CK5_1")
289 : #endif
290 : #if CK4_ENABLED
291 1 : call test%run(test_getReversed_D1_CK4_1, SK_"test_getReversed_D1_CK4_1")
292 1 : call test%run(test_setReversed_D1_CK4_1, SK_"test_setReversed_D1_CK4_1")
293 : #endif
294 : #if CK3_ENABLED
295 1 : call test%run(test_getReversed_D1_CK3_1, SK_"test_getReversed_D1_CK3_1")
296 1 : call test%run(test_setReversed_D1_CK3_1, SK_"test_setReversed_D1_CK3_1")
297 : #endif
298 : #if CK2_ENABLED
299 1 : call test%run(test_getReversed_D1_CK2_1, SK_"test_getReversed_D1_CK2_1")
300 1 : call test%run(test_setReversed_D1_CK2_1, SK_"test_setReversed_D1_CK2_1")
301 : #endif
302 : #if CK1_ENABLED
303 1 : call test%run(test_getReversed_D1_CK1_1 , SK_"test_getReversed_D1_CK1_1")
304 1 : call test%run(test_setReversed_D1_CK1_1 , SK_"test_setReversed_D1_CK1_1")
305 : #endif
306 :
307 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
308 :
309 : #if RK5_ENABLED
310 : call test%run(test_getReversed_D1_RK5_1, SK_"test_getReversed_D1_RK5_1")
311 : call test%run(test_setReversed_D1_RK5_1, SK_"test_setReversed_D1_RK5_1")
312 : #endif
313 : #if RK4_ENABLED
314 1 : call test%run(test_getReversed_D1_RK4_1, SK_"test_getReversed_D1_RK4_1")
315 1 : call test%run(test_setReversed_D1_RK4_1, SK_"test_setReversed_D1_RK4_1")
316 : #endif
317 : #if RK3_ENABLED
318 1 : call test%run(test_getReversed_D1_RK3_1, SK_"test_getReversed_D1_RK3_1")
319 1 : call test%run(test_setReversed_D1_RK3_1, SK_"test_setReversed_D1_RK3_1")
320 : #endif
321 : #if RK2_ENABLED
322 1 : call test%run(test_getReversed_D1_RK2_1, SK_"test_getReversed_D1_RK2_1")
323 1 : call test%run(test_setReversed_D1_RK2_1, SK_"test_setReversed_D1_RK2_1")
324 : #endif
325 : #if RK1_ENABLED
326 1 : call test%run(test_getReversed_D1_RK1_1 , SK_"test_getReversed_D1_RK1_1")
327 1 : call test%run(test_setReversed_D1_RK1_1 , SK_"test_setReversed_D1_RK1_1")
328 : #endif
329 :
330 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
331 1 : call test%summarize()
332 :
333 1 : end subroutine setTest
334 :
335 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
336 :
337 : end module test_pm_arrayReverse
|