@@ -146,15 +146,15 @@ subroutine run_hashmap_tests(error, map, name, hasher)
146
146
end select
147
147
148
148
! Set key to a new value
149
- call map % set_other_data( key, (i + test_size) , exists )
149
+ call map % set_other_data( key, - i , exists )
150
150
call check(error, exists, " Failure on key interface set_other_data for" // trim (name))
151
151
152
152
! Get updated value and verify it is correct.
153
153
call map % get_other_data( key, data , exists )
154
154
call check(error, exists, " Failure on key interface for get_other_data after set_other_data for" // trim (name))
155
155
select type (data )
156
156
type is (integer )
157
- call check(error, data == (i + test_size) , " Failure on key interface set_other_data data check for" // trim (name))
157
+ call check(error, data == - i , " Failure on key interface set_other_data data check for" // trim (name))
158
158
class default
159
159
call test_failed(error, " Key interface set_other_data get_other_data didn't return an integer for " // trim (name))
160
160
end select
@@ -167,7 +167,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
167
167
call map% get_all_keys(keys)
168
168
call check(error, size (keys) == test_size, " Failure on key interface for get_all_keys for " // trim (name))
169
169
170
- ! Check remove and get all keys function
170
+ ! Check key remove
171
171
do i = 1 , test_size
172
172
call set(key, [i])
173
173
@@ -211,15 +211,15 @@ subroutine run_hashmap_tests(error, map, name, hasher)
211
211
end select
212
212
213
213
! Set key to a new value
214
- call map % set_other_data( key_array, (i + test_size) , exists )
214
+ call map % set_other_data( key_array, - i , exists )
215
215
call check(error, exists, " Failure on int8 interface set_other_data for" // trim (name))
216
216
217
217
! Get updated value and verify it is correct.
218
218
call map % get_other_data( key_array, data , exists )
219
219
call check(error, exists, " Failure on int8 interface for get_other_data after set_other_data for" // trim (name))
220
220
select type (data )
221
221
type is (integer )
222
- call check(error, data == (i + test_size) , &
222
+ call check(error, data == - i , &
223
223
" Failure on int8 interface set_other_data data check for" // trim (name))
224
224
class default
225
225
call test_failed(error, &
@@ -234,7 +234,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
234
234
call map% get_all_keys(keys)
235
235
call check(error, size (keys) == test_size, " Failure on int8 interface for get_all_keys for " // trim (name))
236
236
237
- ! Check remove and get all keys function
237
+ ! Check key remove
238
238
do i = 1 , test_size
239
239
key_array = transfer (i,key_array)
240
240
@@ -279,15 +279,15 @@ subroutine run_hashmap_tests(error, map, name, hasher)
279
279
end select
280
280
281
281
! Set key to a new value
282
- call map % set_other_data( key_array, (i + test_size) , exists )
282
+ call map % set_other_data( key_array, - i , exists )
283
283
call check(error, exists, " Failure on int32 interface set_other_data for" // trim (name))
284
284
285
285
! Get updated value and verify it is correct.
286
286
call map % get_other_data( key_array, data , exists )
287
287
call check(error, exists, " Failure on int32 interface for get_other_data after set_other_data for" // trim (name))
288
288
select type (data )
289
289
type is (integer )
290
- call check(error, data == (i + test_size) , &
290
+ call check(error, data == - i , &
291
291
" Failure on int32 interface set_other_data data check for" // trim (name))
292
292
class default
293
293
call test_failed(error, &
@@ -301,7 +301,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
301
301
call map% get_all_keys(keys)
302
302
call check(error, size (keys) == test_size, " Failure on int32 interface for get_all_keys for " // trim (name))
303
303
304
- ! Check remove and get all keys function
304
+ ! Check key remove
305
305
do i = 1 , test_size
306
306
key_array = i
307
307
@@ -347,7 +347,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
347
347
end select
348
348
349
349
! Set key to a new value
350
- call map % set_other_data( char_key, (i + test_size) , exists )
350
+ call map % set_other_data( char_key, - i , exists )
351
351
call check(error, exists, " Failure on char interface set_other_data for" // trim (name))
352
352
353
353
! Get updated value and verify it is correct.
@@ -356,7 +356,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
356
356
" Failure on char interface for get_other_data after set_other_data for" // trim (name))
357
357
select type (data )
358
358
type is (integer )
359
- call check(error, data == (i + test_size) , &
359
+ call check(error, data == - i , &
360
360
" Failure on char interface set_other_data data check for" // trim (name))
361
361
class default
362
362
call test_failed(error, &
@@ -370,7 +370,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
370
370
call map% get_all_keys(keys)
371
371
call check(error, size (keys) == test_size, " Failure on char interface for get_all_keys for " // trim (name))
372
372
373
- ! Check remove and get all keys function
373
+ ! Check key remove
374
374
do i = 1 , test_size
375
375
write (char_key, ' (I0)' ) i
376
376
@@ -409,7 +409,7 @@ subroutine run_hashmap_tests(error, map, name, hasher)
409
409
end select
410
410
enddo
411
411
412
- ! Check miscellaneous functions calls
412
+ ! Check miscellaneous functions
413
413
block
414
414
real :: ratio
415
415
integer :: num_slots, nprobes, depth, bits
0 commit comments