ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
test_pm_arrayInsert.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
24
25!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
28
30 use pm_err, only: err_type
31 use pm_test, only: test_type, LK
32 implicit none
33
34 private
35 public :: setTest
36 type(test_type) :: test
37
38!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39
40 interface
41
42 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43
44#if SK5_ENABLED
45 module function test_setInserted_D0_SK5_1 () result(assertion); logical(LK) :: assertion; end function
46#endif
47#if SK4_ENABLED
48 module function test_setInserted_D0_SK4_1 () result(assertion); logical(LK) :: assertion; end function
49#endif
50#if SK3_ENABLED
51 module function test_setInserted_D0_SK3_1 () result(assertion); logical(LK) :: assertion; end function
52#endif
53#if SK2_ENABLED
54 module function test_setInserted_D0_SK2_1 () result(assertion); logical(LK) :: assertion; end function
55#endif
56#if SK1_ENABLED
57 module function test_setInserted_D0_SK1_1 () result(assertion); logical(LK) :: assertion; end function
58#endif
59
60 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61
62#if SK5_ENABLED
63 module function test_setInserted_D1_SK5_1 () result(assertion); logical(LK) :: assertion; end function
64#endif
65#if SK4_ENABLED
66 module function test_setInserted_D1_SK4_1 () result(assertion); logical(LK) :: assertion; end function
67#endif
68#if SK3_ENABLED
69 module function test_setInserted_D1_SK3_1 () result(assertion); logical(LK) :: assertion; end function
70#endif
71#if SK2_ENABLED
72 module function test_setInserted_D1_SK2_1 () result(assertion); logical(LK) :: assertion; end function
73#endif
74#if SK1_ENABLED
75 module function test_setInserted_D1_SK1_1 () result(assertion); logical(LK) :: assertion; end function
76#endif
77
78 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79
80#if IK5_ENABLED
81 module function test_setInserted_D1_IK5_1 () result(assertion); logical(LK) :: assertion; end function
82#endif
83#if IK4_ENABLED
84 module function test_setInserted_D1_IK4_1 () result(assertion); logical(LK) :: assertion; end function
85#endif
86#if IK3_ENABLED
87 module function test_setInserted_D1_IK3_1 () result(assertion); logical(LK) :: assertion; end function
88#endif
89#if IK2_ENABLED
90 module function test_setInserted_D1_IK2_1 () result(assertion); logical(LK) :: assertion; end function
91#endif
92#if IK1_ENABLED
93 module function test_setInserted_D1_IK1_1 () result(assertion); logical(LK) :: assertion; end function
94#endif
95
96 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97
98#if LK5_ENABLED
99 module function test_setInserted_D1_LK5_1 () result(assertion); logical(LK) :: assertion; end function
100#endif
101#if LK4_ENABLED
102 module function test_setInserted_D1_LK4_1 () result(assertion); logical(LK) :: assertion; end function
103#endif
104#if LK3_ENABLED
105 module function test_setInserted_D1_LK3_1 () result(assertion); logical(LK) :: assertion; end function
106#endif
107#if LK2_ENABLED
108 module function test_setInserted_D1_LK2_1 () result(assertion); logical(LK) :: assertion; end function
109#endif
110#if LK1_ENABLED
111 module function test_setInserted_D1_LK1_1 () result(assertion); logical(LK) :: assertion; end function
112#endif
113
114 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
115
116#if CK5_ENABLED
117 module function test_setInserted_D1_CK5_1 () result(assertion); logical(LK) :: assertion; end function
118#endif
119#if CK4_ENABLED
120 module function test_setInserted_D1_CK4_1 () result(assertion); logical(LK) :: assertion; end function
121#endif
122#if CK3_ENABLED
123 module function test_setInserted_D1_CK3_1 () result(assertion); logical(LK) :: assertion; end function
124#endif
125#if CK2_ENABLED
126 module function test_setInserted_D1_CK2_1 () result(assertion); logical(LK) :: assertion; end function
127#endif
128#if CK1_ENABLED
129 module function test_setInserted_D1_CK1_1 () result(assertion); logical(LK) :: assertion; end function
130#endif
131
132 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133
134#if RK5_ENABLED
135 module function test_setInserted_D1_RK5_1 () result(assertion); logical(LK) :: assertion; end function
136#endif
137#if RK4_ENABLED
138 module function test_setInserted_D1_RK4_1 () result(assertion); logical(LK) :: assertion; end function
139#endif
140#if RK3_ENABLED
141 module function test_setInserted_D1_RK3_1 () result(assertion); logical(LK) :: assertion; end function
142#endif
143#if RK2_ENABLED
144 module function test_setInserted_D1_RK2_1 () result(assertion); logical(LK) :: assertion; end function
145#endif
146#if RK1_ENABLED
147 module function test_setInserted_D1_RK1_1 () result(assertion); logical(LK) :: assertion; end function
148#endif
149
150 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151
152 end interface
153
154!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155
156contains
157
158!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159
160 subroutine setTest()
161
162 implicit none
163
165
166 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
168#if SK5_ENABLED
169 call test%run(test_setInserted_D0_SK5_1, SK_"test_setInserted_D0_SK5_1")
170#endif
171#if SK4_ENABLED
172 call test%run(test_setInserted_D0_SK4_1, SK_"test_setInserted_D0_SK4_1")
173#endif
174#if SK3_ENABLED
175 call test%run(test_setInserted_D0_SK3_1, SK_"test_setInserted_D0_SK3_1")
176#endif
177#if SK2_ENABLED
178 call test%run(test_setInserted_D0_SK2_1, SK_"test_setInserted_D0_SK2_1")
179#endif
180#if SK1_ENABLED
181 call test%run(test_setInserted_D0_SK1_1 , SK_"test_setInserted_D0_SK1_1")
182#endif
183
184 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
185
186#if SK5_ENABLED
187 call test%run(test_setInserted_D1_SK5_1, SK_"test_setInserted_D1_SK5_1")
188#endif
189#if SK4_ENABLED
190 call test%run(test_setInserted_D1_SK4_1, SK_"test_setInserted_D1_SK4_1")
191#endif
192#if SK3_ENABLED
193 call test%run(test_setInserted_D1_SK3_1, SK_"test_setInserted_D1_SK3_1")
194#endif
195#if SK2_ENABLED
196 call test%run(test_setInserted_D1_SK2_1, SK_"test_setInserted_D1_SK2_1")
197#endif
198#if SK1_ENABLED
199 call test%run(test_setInserted_D1_SK1_1 , SK_"test_setInserted_D1_SK1_1")
200#endif
201
202 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
203
204#if IK5_ENABLED
205 call test%run(test_setInserted_D1_IK5_1, SK_"test_setInserted_D1_IK5_1")
206#endif
207#if IK4_ENABLED
208 call test%run(test_setInserted_D1_IK4_1, SK_"test_setInserted_D1_IK4_1")
209#endif
210#if IK3_ENABLED
211 call test%run(test_setInserted_D1_IK3_1, SK_"test_setInserted_D1_IK3_1")
212#endif
213#if IK2_ENABLED
214 call test%run(test_setInserted_D1_IK2_1, SK_"test_setInserted_D1_IK2_1")
215#endif
216#if IK1_ENABLED
217 call test%run(test_setInserted_D1_IK1_1 , SK_"test_setInserted_D1_IK1_1")
218#endif
219
220 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221
222#if LK5_ENABLED
223 call test%run(test_setInserted_D1_LK5_1, SK_"test_setInserted_D1_LK5_1")
224#endif
225#if LK4_ENABLED
226 call test%run(test_setInserted_D1_LK4_1, SK_"test_setInserted_D1_LK4_1")
227#endif
228#if LK3_ENABLED
229 call test%run(test_setInserted_D1_LK3_1, SK_"test_setInserted_D1_LK3_1")
230#endif
231#if LK2_ENABLED
232 call test%run(test_setInserted_D1_LK2_1, SK_"test_setInserted_D1_LK2_1")
233#endif
234#if LK1_ENABLED
235 call test%run(test_setInserted_D1_LK1_1 , SK_"test_setInserted_D1_LK1_1")
236#endif
237
238 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239
240#if CK5_ENABLED
241 call test%run(test_setInserted_D1_CK5_1, SK_"test_setInserted_D1_CK5_1")
242#endif
243#if CK4_ENABLED
244 call test%run(test_setInserted_D1_CK4_1, SK_"test_setInserted_D1_CK4_1")
245#endif
246#if CK3_ENABLED
247 call test%run(test_setInserted_D1_CK3_1, SK_"test_setInserted_D1_CK3_1")
248#endif
249#if CK2_ENABLED
250 call test%run(test_setInserted_D1_CK2_1, SK_"test_setInserted_D1_CK2_1")
251#endif
252#if CK1_ENABLED
253 call test%run(test_setInserted_D1_CK1_1 , SK_"test_setInserted_D1_CK1_1")
254#endif
255
256 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
257
258#if RK5_ENABLED
259 call test%run(test_setInserted_D1_RK5_1, SK_"test_setInserted_D1_RK5_1")
260#endif
261#if RK4_ENABLED
262 call test%run(test_setInserted_D1_RK4_1, SK_"test_setInserted_D1_RK4_1")
263#endif
264#if RK3_ENABLED
265 call test%run(test_setInserted_D1_RK3_1, SK_"test_setInserted_D1_RK3_1")
266#endif
267#if RK2_ENABLED
268 call test%run(test_setInserted_D1_RK2_1, SK_"test_setInserted_D1_RK2_1")
269#endif
270#if RK1_ENABLED
271 call test%run(test_setInserted_D1_RK1_1 , SK_"test_setInserted_D1_RK1_1")
272#endif
273
274 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
275
276 call test%summarize()
277
278 end subroutine setTest
279
280!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
281
282end module test_pm_arrayInsert ! LCOV_EXCL_LINE
This module contains procedures and generic interfaces for inserting an insertion into the specified ...
character(*, SK), parameter MODULE_NAME
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
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_arrayInsert.
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