fortrangoingonforty/fortsh / 885a152

Browse files

Fix test_memory_pool for pointer-based string_ref

Update allocated() to associated() since string_ref%data is now
a pointer instead of allocatable array.
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
885a152fdba28c38e7761ddacd0c5cd1fbf8a880
Parents
89891d8
Tree
2b1061d

1 changed file

StatusFile+-
M tests/test_memory_pool.f90 2 2
tests/test_memory_pool.f90modified
@@ -22,7 +22,7 @@ program test_memory_pool
2222
   call pool_init()
2323
   ref1 = pool_get_string(100)
2424
 
25
-  if (.not. allocated(ref1%data)) then
25
+  if (.not. associated(ref1%data)) then
2626
     print *, "  FAILED: String not allocated"
2727
     all_tests_passed = .false.
2828
   else
@@ -108,7 +108,7 @@ program test_memory_pool
108108
   print *, "Test 6: Large allocation fallback..."
109109
   ref1 = pool_get_string(100000)  ! 100KB - should bypass pool
110110
 
111
-  if (.not. allocated(ref1%data)) then
111
+  if (.not. associated(ref1%data)) then
112112
     print *, "  FAILED: Large allocation failed"
113113
     all_tests_passed = .false.
114114
   else