@@ -43,9 +43,10 @@ subroutine test_loadtxt_int32(error)
43
43
input = int (harvest * 100 )
44
44
call savetxt(' test_int32.txt' , input)
45
45
call loadtxt(' test_int32.txt' , expected)
46
- call check(error, all (input == expected))
46
+ call check(error, all (input == expected),' Default list directed read failed' )
47
+ if (allocated (error)) return
47
48
call loadtxt(' test_int32.txt' , expected, fmt= ' *' )
48
- call check(error, all (input == expected))
49
+ call check(error, all (input == expected), ' User specified list directed read faile ' )
49
50
if (allocated (error)) return
50
51
end do
51
52
@@ -67,11 +68,13 @@ subroutine test_loadtxt_sp(error)
67
68
input = input - 0.5
68
69
call savetxt(' test_sp.txt' , input)
69
70
call loadtxt(' test_sp.txt' , expected)
70
- call check(error, all (input == expected))
71
+ call check(error, all (input == expected),' Default format read failed' )
72
+ if (allocated (error)) return
71
73
call loadtxt(' test_sp.txt' , expected, fmt= ' *' )
72
- call check(error, all (input == expected))
74
+ call check(error, all (input == expected),' List directed read failed' )
75
+ if (allocated (error)) return
73
76
call loadtxt(' test_sp.txt' , expected, fmt= " (*" // FMT_REAL_sp(1 :len (FMT_REAL_sp)- 1 )// " ,1x))" )
74
- call check(error, all (input == expected))
77
+ call check(error, all (input == expected), ' User specified format failed ' )
75
78
if (allocated (error)) return
76
79
end do
77
80
@@ -93,11 +96,13 @@ subroutine test_loadtxt_sp_huge(error)
93
96
input = (input - 0.5 ) * huge (input)
94
97
call savetxt(' test_sp_huge.txt' , input)
95
98
call loadtxt(' test_sp_huge.txt' , expected)
96
- call check(error, all (input == expected))
99
+ call check(error, all (input == expected),' Default format read failed' )
100
+ if (allocated (error)) return
97
101
call loadtxt(' test_sp_huge.txt' , expected, fmt= ' *' )
98
- call check(error, all (input == expected))
102
+ call check(error, all (input == expected),' List directed read failed' )
103
+ if (allocated (error)) return
99
104
call loadtxt(' test_sp_huge.txt' , expected, fmt= " (*" // FMT_REAL_sp(1 :len (FMT_REAL_sp)- 1 )// " ,1x))" )
100
- call check(error, all (input == expected))
105
+ call check(error, all (input == expected), ' User specified format failed ' )
101
106
if (allocated (error)) return
102
107
end do
103
108
@@ -119,11 +124,13 @@ subroutine test_loadtxt_sp_tiny(error)
119
124
input = (input - 0.5 ) * tiny (input)
120
125
call savetxt(' test_sp_tiny.txt' , input)
121
126
call loadtxt(' test_sp_tiny.txt' , expected)
122
- call check(error, all (input == expected))
127
+ call check(error, all (input == expected),' Default format read failed' )
128
+ if (allocated (error)) return
123
129
call loadtxt(' test_sp_tiny.txt' , expected, fmt= ' *' )
124
- call check(error, all (input == expected))
130
+ call check(error, all (input == expected),' List directed read failed' )
131
+ if (allocated (error)) return
125
132
call loadtxt(' test_sp_tiny.txt' , expected, fmt= " (*" // FMT_REAL_sp(1 :len (FMT_REAL_sp)- 1 )// " ,1x))" )
126
- call check(error, all (input == expected))
133
+ call check(error, all (input == expected), ' User specified format failed ' )
127
134
if (allocated (error)) return
128
135
end do
129
136
@@ -145,11 +152,13 @@ subroutine test_loadtxt_dp(error)
145
152
input = input - 0.5
146
153
call savetxt(' test_dp.txt' , input)
147
154
call loadtxt(' test_dp.txt' , expected)
148
- call check(error, all (input == expected))
155
+ call check(error, all (input == expected),' Default format read failed' )
156
+ if (allocated (error)) return
149
157
call loadtxt(' test_dp.txt' , expected, fmt= ' *' )
150
- call check(error, all (input == expected))
158
+ call check(error, all (input == expected),' List directed read failed' )
159
+ if (allocated (error)) return
151
160
call loadtxt(' test_dp.txt' , expected, fmt= " (*" // FMT_REAL_dp(1 :len (FMT_REAL_dp)- 1 )// " ,1x))" )
152
- call check(error, all (input == expected))
161
+ call check(error, all (input == expected), ' User specified format failed ' )
153
162
if (allocated (error)) return
154
163
end do
155
164
@@ -171,11 +180,13 @@ subroutine test_loadtxt_dp_max_skip(error)
171
180
input = input - 0.5
172
181
call savetxt(' test_dp_max_skip.txt' , input)
173
182
call loadtxt(' test_dp_max_skip.txt' , expected, skiprows= m, max_rows= n)
174
- call check(error, all (input(m+1 :min (n+ m,10 ),:) == expected))
183
+ call check(error, all (input(m+1 :min (n+ m,10 ),:) == expected),' Default format read failed' )
184
+ if (allocated (error)) return
175
185
call loadtxt(' test_dp_max_skip.txt' , expected, skiprows= m, max_rows= n, fmt= ' *' )
176
- call check(error, all (input(m+1 :min (n+ m,10 ),:) == expected))
186
+ call check(error, all (input(m+1 :min (n+ m,10 ),:) == expected),' List directed read failed' )
187
+ if (allocated (error)) return
177
188
call loadtxt(' test_dp_max_skip.txt' , expected, fmt= " (*" // FMT_REAL_dp(1 :len (FMT_REAL_dp)- 1 )// " ,1x))" )
178
- call check(error, all (input == expected))
189
+ call check(error, all (input == expected), ' User specified format failed ' )
179
190
deallocate (expected)
180
191
if (allocated (error)) return
181
192
end do
@@ -199,11 +210,13 @@ subroutine test_loadtxt_dp_huge(error)
199
210
input = (input - 0.5 ) * huge (input)
200
211
call savetxt(' test_dp_huge.txt' , input)
201
212
call loadtxt(' test_dp_huge.txt' , expected)
202
- call check(error, all (input == expected))
213
+ call check(error, all (input == expected),' Default format read failed' )
214
+ if (allocated (error)) return
203
215
call loadtxt(' test_dp_huge.txt' , expected, fmt= ' *' )
204
- call check(error, all (input == expected))
216
+ call check(error, all (input == expected),' List directed read failed' )
217
+ if (allocated (error)) return
205
218
call loadtxt(' test_dp_huge.txt' , expected, fmt= " (*" // FMT_REAL_dp(1 :len (FMT_REAL_dp)- 1 )// " ,1x))" )
206
- call check(error, all (input == expected))
219
+ call check(error, all (input == expected), ' User specified format failed ' )
207
220
if (allocated (error)) return
208
221
end do
209
222
@@ -225,11 +238,13 @@ subroutine test_loadtxt_dp_tiny(error)
225
238
input = (input - 0.5 ) * tiny (input)
226
239
call savetxt(' test_dp_tiny.txt' , input)
227
240
call loadtxt(' test_dp_tiny.txt' , expected)
228
- call check(error, all (input == expected))
241
+ call check(error, all (input == expected),' Default format read failed' )
242
+ if (allocated (error)) return
229
243
call loadtxt(' test_dp_tiny.txt' , expected, fmt= ' *' )
230
- call check(error, all (input == expected))
244
+ call check(error, all (input == expected),' List directed read failed' )
245
+ if (allocated (error)) return
231
246
call loadtxt(' test_dp_tiny.txt' , expected, fmt= " (*" // FMT_REAL_dp(1 :len (FMT_REAL_dp)- 1 )// " ,1x))" )
232
- call check(error, all (input == expected))
247
+ call check(error, all (input == expected), ' User specified format failed ' )
233
248
if (allocated (error)) return
234
249
end do
235
250
0 commit comments