@@ -14,10 +14,6 @@ module jf_test_12_mod
1414 private
1515 public :: test_12
1616
17- character (len=* ),parameter :: dir = ' ../files/' ! ! Path to write JSON file to
18- character (len=* ),parameter :: file = ' test12.json' ! ! Filename to write
19- real (wp), parameter :: TOL = 100 * epsilon (1.0_wp ) ! ! Tolerance for real comparisons
20-
2117contains
2218
2319 subroutine test_12 (error_cnt )
@@ -27,6 +23,8 @@ subroutine test_12(error_cnt)
2723 integer ,intent (out ) :: error_cnt ! ! report number of errors to caller
2824
2925 integer (IK),parameter :: imx = 5 , jmx = 3 , kmx = 4 ! ! dimensions for raw work array of primitive type
26+ character (len=* ),parameter :: file = ' ../files/test12.json' ! ! Filename to write
27+ real (wp), parameter :: TOL = 100 * epsilon (1.0_wp ) ! ! Tolerance for real comparisons
3028
3129 type (json_core) :: json ! ! factory for manipulating `json_value` pointers
3230 integer (IK),dimension (3 ) :: shape ! ! shape of work array
@@ -58,7 +56,7 @@ subroutine test_12(error_cnt)
5856 raw_array(i,j,k) = i + (j-1_IK )* imx + (k-1_IK )* imx* jmx
5957 end forall
6058
61- call json% create_object(root,dir // file)
59+ call json% create_object(root,file)
6260 call check_errors()
6361
6462 call json% create_object(meta_array,' array data' )
@@ -172,7 +170,7 @@ subroutine test_12(error_cnt)
172170 ! call my_file%get(tmp_json_ptr)
173171 ! call check_file_errors(associated(tmp_json_ptr,root))
174172
175- open (file= dir // file,newunit= lun,form= ' formatted' ,action= ' write' )
173+ open (file= file,newunit= lun,form= ' formatted' ,action= ' write' )
176174 call my_file% print (lun)
177175 call check_file_errors()
178176 close (lun)
0 commit comments