Skip to content

Commit 4d28c78

Browse files
committed
increase coverage.
1 parent eeedbcf commit 4d28c78

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

src/json_value_module.F90

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,9 +1228,6 @@ subroutine json_matrix_info_by_path(json,p,path,is_matrix,found,&
12281228

12291229
type(json_value),pointer :: p_var
12301230
logical(LK) :: ok
1231-
#if defined __GFORTRAN__
1232-
character(kind=CK,len=:),allocatable :: p_name !! for getting the name
1233-
#endif
12341231

12351232
call json%get(p,path,p_var,found)
12361233

@@ -1249,17 +1246,7 @@ subroutine json_matrix_info_by_path(json,p,path,is_matrix,found,&
12491246
else
12501247

12511248
!get info about the variable:
1252-
!#if defined __GFORTRAN__
1253-
! ! [note: passing name directory to this routine seems
1254-
! ! to have a bug on older gfortran versions...
1255-
! ! ... it also seems to be failing with unicode build ...
1256-
! ! ... this doesn't seem to fix the problem ...
1257-
! call json%matrix_info(p_var,is_matrix,var_type,n_sets,set_size,p_name)
1258-
! if (present(name)) name = p_name
1259-
! if (allocated(p_name)) deallocate(p_name)
1260-
!#else
12611249
call json%matrix_info(p_var,is_matrix,var_type,n_sets,set_size,name)
1262-
!#endif
12631250
if (json%failed() .and. present(found)) then
12641251
found = .false.
12651252
call json%clear_exceptions()

src/tests/jf_test_19.f90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
module jf_test_19_mod
88

9-
use json_module, lk => json_lk, rk => json_rk, ik => json_ik, ck => json_ck
9+
use json_module, lk => json_lk, rk => json_rk, ik => json_ik,&
10+
ck => json_ck, cdk => json_cdk
1011
use, intrinsic :: iso_fortran_env , only: error_unit,output_unit
1112

1213
implicit none
@@ -128,6 +129,13 @@ subroutine test_19(error_cnt)
128129
set_size=set_size,name=name)
129130
if (found) then
130131
write(error_unit,'(A)') '...success'
132+
133+
!test again with CDK path (for unicode wrapper)
134+
call json%matrix_info(p,CDK_'matrix',is_matrix,found=found,&
135+
var_type=var_type,n_sets=n_sets,&
136+
set_size=set_size,name=name)
137+
138+
131139
else
132140
write(error_unit,*) 'error calling json_matrix_info_by_path with found input'
133141
error_cnt = error_cnt + 1

src/tests/jf_test_4.f90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ subroutine test_4(error_cnt)
111111
write(error_unit,'(A)') ''
112112
!get some info:
113113
call core%info(p,'INPUTS',found,var_type,n_children,name)
114-
if (.not. found) then
114+
if (found) then
115+
!test again with CDK path (for unicode wrapper)
116+
call core%info(p,json_cdk_'INPUTS',found,var_type,n_children,name)
117+
else
115118
write(error_unit,'(A)') 'Error getting info on INPUT'
116119
error_cnt = error_cnt + 1
117120
end if

0 commit comments

Comments
 (0)