Skip to content

Commit e437cf0

Browse files
committed
update unit test 15 to avoid crash on Travis?
1 parent 66a9a40 commit e437cf0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/tests/jf_test_15.f90

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ subroutine test_15(error_cnt)
3737
write(error_unit,'(A)') ''
3838

3939
error_cnt = 0
40+
41+
nullify(json)
42+
nullify(p)
43+
44+
call json_parse(json, '{"int": 1, "real": 2.0, "logical": true}')
45+
call json_get(json,'real', i)
46+
call json_get(json,'logical',i)
47+
call json_get(json,'integer',d)
48+
call json_get(json,'logical',d)
49+
call json_get(json,'integer',tf)
50+
call json_get(json,'real', tf)
4051

4152
call json_check_for_errors(status_ok, error_msg) !error condition true
4253

@@ -65,15 +76,7 @@ subroutine test_15(error_cnt)
6576
call json_print(json,-1) !invalid input
6677
call json_print(json,filename='') !invalid input
6778

68-
call json_initialize() !clear exceptions
69-
70-
call json_parse(json, '{"int": 1, "real": 2.0, "logical": true}')
71-
call json_get(json,'real', i)
72-
call json_get(json,'logical',i)
73-
call json_get(json,'integer',d)
74-
call json_get(json,'logical',d)
75-
call json_get(json,'integer',tf)
76-
call json_get(json,'real', tf)
79+
call json_initialize() !clear exceptions
7780

7881
end subroutine test_15
7982

0 commit comments

Comments
 (0)