Skip to content

Commit 5925f1c

Browse files
committed
updated to test edge case for insert routine.
1 parent b079b87 commit 5925f1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/tests/jf_test_20.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ subroutine test_20(error_cnt)
128128
! cleanup:
129129
call json%destroy(p)
130130

131+
! now, just a test of the edge case:
132+
! (where p doesn't have a parent)
133+
call json%create_object(p,'root')
134+
call json%create_object(new,'next')
135+
call json%insert_after(p,new)
136+
call json%destroy(p)
137+
131138
write(error_unit,'(A)') ''
132139
write(error_unit,'(A)') '================================='
133140
write(error_unit,'(A)') ''

0 commit comments

Comments
 (0)