|
6 | 6 |
|
7 | 7 | module jf_test_37_mod
|
8 | 8 |
|
9 |
| - use json_module, CK => json_CK |
| 9 | + use json_module, CK => json_CK, CDK => json_CDK |
10 | 10 | use, intrinsic :: iso_fortran_env , only: error_unit, output_unit
|
11 | 11 |
|
12 | 12 | implicit none
|
@@ -64,6 +64,38 @@ subroutine test_37(error_cnt)
|
64 | 64 | call check_for_error()
|
65 | 65 | call f%destroy()
|
66 | 66 |
|
| 67 | +# ifdef USE_UCS4 |
| 68 | + |
| 69 | + ! also test default character kind when unicode is enabled: |
| 70 | + |
| 71 | + call json%parse(p, CDK_'{"a": ["1", "2", "3"]}') |
| 72 | + f = json_file(p,no_whitespace=.true.) |
| 73 | + call f%print_file(error_unit) |
| 74 | + write(error_unit,'(A)') '' |
| 75 | + call check_for_error() |
| 76 | + call f%destroy() |
| 77 | + |
| 78 | + call json%parse(p, CDK_'{"b": ["4", "5", "6"]}') |
| 79 | + f = json_file(p,json) |
| 80 | + call f%print_file(error_unit) |
| 81 | + write(error_unit,'(A)') '' |
| 82 | + call check_for_error() |
| 83 | + call f%destroy() |
| 84 | + |
| 85 | + f = json_file(CDK_'{"x": [1,2,3]}',no_whitespace=.true.) |
| 86 | + call f%print_file(error_unit) |
| 87 | + write(error_unit,'(A)') '' |
| 88 | + call check_for_error() |
| 89 | + call f%destroy() |
| 90 | + |
| 91 | + f = json_file(CDK_'{"y": [4,5,6]}',json) |
| 92 | + call f%print_file(error_unit) |
| 93 | + write(error_unit,'(A)') '' |
| 94 | + call check_for_error() |
| 95 | + call f%destroy() |
| 96 | + |
| 97 | +# endif |
| 98 | + |
67 | 99 | if (error_cnt==0) then
|
68 | 100 | write(error_unit,'(A)') ''
|
69 | 101 | write(error_unit,'(A)') ' Success!'
|
|
0 commit comments