diff options
author | Mohamed Abdelnour <mohamed.k.abdelnour@gmail.com> | 2021-05-29 02:24:39 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-06-01 22:36:56 +0200 |
commit | 702b5caf2d27955da0caf6e4432823b1e7d7fb99 (patch) | |
tree | f67a26fe80f8524e401e4dd11f978fe2a2407d25 /tests | |
parent | d395f64f580c4c8f48d5c3b2e94d78ee9001c3ef (diff) |
Add Fortran (Modern) syntax test file
Diffstat (limited to 'tests')
3 files changed, 263 insertions, 0 deletions
diff --git a/tests/syntax-tests/highlighted/Fortran (Modern)/test_savetxt.f90 b/tests/syntax-tests/highlighted/Fortran (Modern)/test_savetxt.f90 new file mode 100644 index 00000000..156885c6 --- /dev/null +++ b/tests/syntax-tests/highlighted/Fortran (Modern)/test_savetxt.f90 @@ -0,0 +1,119 @@ +[38;2;249;38;114mprogram[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_savetxt[0m +[38;2;249;38;114muse[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstdlib_kinds[0m[38;2;248;248;242m, [0m[38;2;249;38;114monly[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[38;2;102;217;239mint32[0m[38;2;248;248;242m, sp, dp[0m +[38;2;249;38;114muse[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstdlib_io[0m[38;2;248;248;242m, [0m[38;2;249;38;114monly[0m[38;2;248;248;242m:[0m[38;2;248;248;242m loadtxt, savetxt[0m +[38;2;249;38;114muse[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstdlib_error[0m[38;2;248;248;242m, [0m[38;2;249;38;114monly[0m[38;2;248;248;242m:[0m[38;2;248;248;242m check[0m +[38;2;249;38;114mimplicit[0m[38;2;248;248;242m [0m[38;2;249;38;114mnone[0m + +[3;38;2;102;217;239mcharacter(:)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mallocatable[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m + +[38;2;248;248;242moutpath [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242mget_outpath[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m//[0m[38;2;248;248;242m [0m[38;2;230;219;116m"/tmp.dat"[0m + +[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mtest_iint32[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath[0m[38;2;248;248;242m)[0m +[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mtest_rsp[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath[0m[38;2;248;248;242m)[0m +[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mtest_rdp[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath[0m[38;2;248;248;242m)[0m +[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mtest_csp[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath[0m[38;2;248;248;242m)[0m +[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mtest_cdp[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath[0m[38;2;248;248;242m)[0m + +[38;2;249;38;114mcontains[0m + +[38;2;248;248;242m [0m[38;2;249;38;114mfunction[0m[38;2;248;248;242m [0m[38;2;166;226;46mget_outpath[0m[38;2;248;248;242m([0m[38;2;248;248;242m) [0m[38;2;249;38;114mresult[0m[38;2;248;248;242m([0m[3;38;2;253;151;31moutpath[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m integer [0m[38;2;249;38;114m::[0m[38;2;248;248;242m ierr[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(256)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255margv[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(:)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mallocatable[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m + +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mget_command_argument[0m[38;2;248;248;242m([0m[38;2;190;132;255m1[0m[38;2;248;248;242m, argv, status[0m[38;2;249;38;114m=[0m[38;2;248;248;242mierr[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mierr[0m[38;2;249;38;114m==[0m[38;2;190;132;255m0[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114mthen[0m +[38;2;248;248;242m outpath [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mtrim[0m[38;2;248;248;242m([0m[38;2;248;248;242margv[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114melse[0m +[38;2;248;248;242m outpath [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m'.'[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;249;38;114mif[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114mfunction[0m[38;2;248;248;242m [0m[38;2;166;226;46mget_outpath[0m + +[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_iint32[0m[38;2;248;248;242m([0m[3;38;2;253;151;31moutpath[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(*)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mintent[0m[38;2;248;248;242m([0m[38;2;190;132;255min[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m +[38;2;248;248;242m [0m[38;2;248;248;242minteger[0m[38;2;248;248;242m([0m[38;2;102;217;239mint32[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md[0m[38;2;248;248;242m([0m[38;2;190;132;255m3[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, [0m[38;2;248;248;242me[0m[38;2;248;248;242m([0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m3[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;248;248;242minteger[0m[38;2;248;248;242m([0m[38;2;102;217;239mint32[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, allocatable [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md2[0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;248;248;242m,[0m[38;2;248;248;242m :[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m d [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242md[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;190;132;255m0[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m + +[38;2;248;248;242m e [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, e[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242me[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;190;132;255m0[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m + + +[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_rsp[0m[38;2;248;248;242m([0m[3;38;2;253;151;31moutpath[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(*)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mintent[0m[38;2;248;248;242m([0m[38;2;190;132;255min[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m +[38;2;248;248;242m [0m[38;2;102;217;239mreal[0m[38;2;248;248;242m([0m[38;2;248;248;242msp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md[0m[38;2;248;248;242m([0m[38;2;190;132;255m3[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, [0m[38;2;248;248;242me[0m[38;2;248;248;242m([0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m3[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;102;217;239mreal[0m[38;2;248;248;242m([0m[38;2;248;248;242msp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, allocatable [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md2[0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;248;248;242m,[0m[38;2;248;248;242m :[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m d [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242md[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._sp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m + +[38;2;248;248;242m e [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, e[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242me[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._sp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_rsp[0m + + +[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_rdp[0m[38;2;248;248;242m([0m[3;38;2;253;151;31moutpath[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(*)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mintent[0m[38;2;248;248;242m([0m[38;2;190;132;255min[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m +[38;2;248;248;242m [0m[38;2;102;217;239mreal[0m[38;2;248;248;242m([0m[38;2;248;248;242mdp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md[0m[38;2;248;248;242m([0m[38;2;190;132;255m3[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, [0m[38;2;248;248;242me[0m[38;2;248;248;242m([0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m3[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;102;217;239mreal[0m[38;2;248;248;242m([0m[38;2;248;248;242mdp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, allocatable [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md2[0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;248;248;242m,[0m[38;2;248;248;242m :[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m d [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242md[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._dp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m + +[38;2;248;248;242m e [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, e[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242me[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._dp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_rdp[0m + +[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_csp[0m[38;2;248;248;242m([0m[3;38;2;253;151;31moutpath[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(*)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mintent[0m[38;2;248;248;242m([0m[38;2;190;132;255min[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m +[38;2;248;248;242m [0m[38;2;248;248;242mcomplex[0m[38;2;248;248;242m([0m[38;2;248;248;242msp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md[0m[38;2;248;248;242m([0m[38;2;190;132;255m3[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, [0m[38;2;248;248;242me[0m[38;2;248;248;242m([0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m3[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;248;248;242mcomplex[0m[38;2;248;248;242m([0m[38;2;248;248;242msp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, allocatable [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md2[0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;248;248;242m,[0m[38;2;248;248;242m :[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m d [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mcmplx[0m[38;2;248;248;242m([0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m1[0m[38;2;248;248;242m,kind[0m[38;2;249;38;114m=[0m[38;2;248;248;242msp[0m[38;2;248;248;242m)[0m[38;2;249;38;114m*[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242md[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._sp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m + +[38;2;248;248;242m e [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mcmplx[0m[38;2;248;248;242m([0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m1[0m[38;2;248;248;242m,kind[0m[38;2;249;38;114m=[0m[38;2;248;248;242msp[0m[38;2;248;248;242m)[0m[38;2;249;38;114m*[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, e[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242me[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._sp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_csp[0m + +[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_cdp[0m[38;2;248;248;242m([0m[3;38;2;253;151;31moutpath[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[3;38;2;102;217;239mcharacter(*)[0m[38;2;248;248;242m, [0m[38;2;249;38;114mintent[0m[38;2;248;248;242m([0m[38;2;190;132;255min[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;255;255;255moutpath[0m +[38;2;248;248;242m [0m[38;2;248;248;242mcomplex[0m[38;2;248;248;242m([0m[38;2;248;248;242mdp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md[0m[38;2;248;248;242m([0m[38;2;190;132;255m3[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, [0m[38;2;248;248;242me[0m[38;2;248;248;242m([0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m3[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;248;248;242mcomplex[0m[38;2;248;248;242m([0m[38;2;248;248;242mdp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m, allocatable [0m[38;2;249;38;114m::[0m[38;2;248;248;242m [0m[38;2;248;248;242md2[0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;248;248;242m,[0m[38;2;248;248;242m :[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m d [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mcmplx[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._dp[0m[38;2;248;248;242m, [0m[38;2;190;132;255m1._dp[0m[38;2;248;248;242m,kind[0m[38;2;249;38;114m=[0m[38;2;248;248;242mdp[0m[38;2;248;248;242m)[0m[38;2;249;38;114m*[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242md[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._dp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m + +[38;2;248;248;242m e [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;102;217;239mcmplx[0m[38;2;248;248;242m([0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m1[0m[38;2;248;248;242m,kind[0m[38;2;249;38;114m=[0m[38;2;248;248;242mdp[0m[38;2;248;248;242m)[0m[38;2;249;38;114m*[0m[38;2;248;248;242m [0m[38;2;102;217;239mreshape[0m[38;2;248;248;242m([0m[38;2;248;248;242m[[0m[38;2;190;132;255m1[0m[38;2;248;248;242m, [0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m, [0m[38;2;190;132;255m4[0m[38;2;248;248;242m, [0m[38;2;190;132;255m5[0m[38;2;248;248;242m, [0m[38;2;190;132;255m6[0m[38;2;248;248;242m][0m[38;2;248;248;242m, [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239msavetxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, e[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mloadtxt[0m[38;2;248;248;242m([0m[38;2;248;248;242moutpath, d2[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mshape[0m[38;2;248;248;242m([0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m, [0m[38;2;190;132;255m3[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mcall[0m[38;2;248;248;242m [0m[38;2;102;217;239mcheck[0m[38;2;248;248;242m([0m[38;2;102;217;239mall[0m[38;2;248;248;242m([0m[38;2;102;217;239mabs[0m[38;2;248;248;242m([0m[38;2;248;248;242me[0m[38;2;249;38;114m-[0m[38;2;248;248;242md2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m<[0m[38;2;248;248;242m [0m[38;2;102;217;239mepsilon[0m[38;2;248;248;242m([0m[38;2;190;132;255m1._dp[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m +[38;2;248;248;242m [0m[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114msubroutine[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_cdp[0m + +[38;2;249;38;114mend[0m[38;2;248;248;242m [0m[38;2;249;38;114mprogram[0m[38;2;248;248;242m [0m[38;2;166;226;46mtest_savetxt[0m diff --git a/tests/syntax-tests/source/Fortran (Modern)/LICENSE.md b/tests/syntax-tests/source/Fortran (Modern)/LICENSE.md new file mode 100644 index 00000000..0cc45c70 --- /dev/null +++ b/tests/syntax-tests/source/Fortran (Modern)/LICENSE.md @@ -0,0 +1,25 @@ +The `test_savetxt.f90` file has been added from https://github.com/fortran-lang/stdlib under the following license: + +```text +MIT License + +Copyright (c) 2019 Fortran stdlib developers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/tests/syntax-tests/source/Fortran (Modern)/test_savetxt.f90 b/tests/syntax-tests/source/Fortran (Modern)/test_savetxt.f90 new file mode 100644 index 00000000..b7e1ef1b --- /dev/null +++ b/tests/syntax-tests/source/Fortran (Modern)/test_savetxt.f90 @@ -0,0 +1,119 @@ +program test_savetxt +use stdlib_kinds, only: int32, sp, dp +use stdlib_io, only: loadtxt, savetxt +use stdlib_error, only: check +implicit none + +character(:), allocatable :: outpath + +outpath = get_outpath() // "/tmp.dat" + +call test_iint32(outpath) +call test_rsp(outpath) +call test_rdp(outpath) +call test_csp(outpath) +call test_cdp(outpath) + +contains + + function get_outpath() result(outpath) + integer :: ierr + character(256) :: argv + character(:), allocatable :: outpath + + call get_command_argument(1, argv, status=ierr) + if (ierr==0) then + outpath = trim(argv) + else + outpath = '.' + endif + end function get_outpath + + subroutine test_iint32(outpath) + character(*), intent(in) :: outpath + integer(int32) :: d(3, 2), e(2, 3) + integer(int32), allocatable :: d2(:, :) + d = reshape([1, 2, 3, 4, 5, 6], [3, 2]) + call savetxt(outpath, d) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [3, 2])) + call check(all(abs(d-d2) == 0)) + + e = reshape([1, 2, 3, 4, 5, 6], [2, 3]) + call savetxt(outpath, e) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [2, 3])) + call check(all(abs(e-d2) == 0)) + end subroutine + + + subroutine test_rsp(outpath) + character(*), intent(in) :: outpath + real(sp) :: d(3, 2), e(2, 3) + real(sp), allocatable :: d2(:, :) + d = reshape([1, 2, 3, 4, 5, 6], [3, 2]) + call savetxt(outpath, d) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [3, 2])) + call check(all(abs(d-d2) < epsilon(1._sp))) + + e = reshape([1, 2, 3, 4, 5, 6], [2, 3]) + call savetxt(outpath, e) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [2, 3])) + call check(all(abs(e-d2) < epsilon(1._sp))) + end subroutine test_rsp + + + subroutine test_rdp(outpath) + character(*), intent(in) :: outpath + real(dp) :: d(3, 2), e(2, 3) + real(dp), allocatable :: d2(:, :) + d = reshape([1, 2, 3, 4, 5, 6], [3, 2]) + call savetxt(outpath, d) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [3, 2])) + call check(all(abs(d-d2) < epsilon(1._dp))) + + e = reshape([1, 2, 3, 4, 5, 6], [2, 3]) + call savetxt(outpath, e) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [2, 3])) + call check(all(abs(e-d2) < epsilon(1._dp))) + end subroutine test_rdp + + subroutine test_csp(outpath) + character(*), intent(in) :: outpath + complex(sp) :: d(3, 2), e(2, 3) + complex(sp), allocatable :: d2(:, :) + d = cmplx(1, 1,kind=sp)* reshape([1, 2, 3, 4, 5, 6], [3, 2]) + call savetxt(outpath, d) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [3, 2])) + call check(all(abs(d-d2) < epsilon(1._sp))) + + e = cmplx(1, 1,kind=sp)* reshape([1, 2, 3, 4, 5, 6], [2, 3]) + call savetxt(outpath, e) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [2, 3])) + call check(all(abs(e-d2) < epsilon(1._sp))) + end subroutine test_csp + + subroutine test_cdp(outpath) + character(*), intent(in) :: outpath + complex(dp) :: d(3, 2), e(2, 3) + complex(dp), allocatable :: d2(:, :) + d = cmplx(1._dp, 1._dp,kind=dp)* reshape([1, 2, 3, 4, 5, 6], [3, 2]) + call savetxt(outpath, d) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [3, 2])) + call check(all(abs(d-d2) < epsilon(1._dp))) + + e = cmplx(1, 1,kind=dp)* reshape([1, 2, 3, 4, 5, 6], [2, 3]) + call savetxt(outpath, e) + call loadtxt(outpath, d2) + call check(all(shape(d2) == [2, 3])) + call check(all(abs(e-d2) < epsilon(1._dp))) + end subroutine test_cdp + +end program test_savetxt |