diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-06-19 21:31:56 -0400 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-06-19 21:42:29 -0400 |
commit | f7465c0887e52ebedb024745d504bf95f113ae0d (patch) | |
tree | 58ca813ca578f5a5a6b9087b164491a21880a2e6 /test cases/fortran | |
parent | 2106a6020cf0ac3b172177a9719ca78bb79b9748 (diff) | |
download | meson-f7465c0887e52ebedb024745d504bf95f113ae0d.zip meson-f7465c0887e52ebedb024745d504bf95f113ae0d.tar.gz meson-f7465c0887e52ebedb024745d504bf95f113ae0d.tar.bz2 |
add fortran module inline comment test
Diffstat (limited to 'test cases/fortran')
-rw-r--r-- | test cases/fortran/2 modules/comment_mod.f90 | 6 | ||||
-rw-r--r-- | test cases/fortran/2 modules/meson.build | 2 | ||||
-rw-r--r-- | test cases/fortran/2 modules/mymod.f90 | 6 | ||||
-rw-r--r-- | test cases/fortran/2 modules/prog.f90 | 12 | ||||
-rw-r--r-- | test cases/fortran/2 modules/stuff.f90 | 5 |
5 files changed, 21 insertions, 10 deletions
diff --git a/test cases/fortran/2 modules/comment_mod.f90 b/test cases/fortran/2 modules/comment_mod.f90 new file mode 100644 index 0000000..d7808ac --- /dev/null +++ b/test cases/fortran/2 modules/comment_mod.f90 @@ -0,0 +1,6 @@ +module line! inline comment +implicit none + +real :: length + +end module line
\ No newline at end of file diff --git a/test cases/fortran/2 modules/meson.build b/test cases/fortran/2 modules/meson.build index 030f255..7893551 100644 --- a/test cases/fortran/2 modules/meson.build +++ b/test cases/fortran/2 modules/meson.build @@ -1,4 +1,4 @@ project('modules', 'fortran') -e = executable('modprog', 'stuff.f90', 'prog.f90') +e = executable('modprog', 'mymod.f90', 'prog.f90', 'comment_mod.f90') test('moduletest', e) diff --git a/test cases/fortran/2 modules/mymod.f90 b/test cases/fortran/2 modules/mymod.f90 new file mode 100644 index 0000000..f8e7929 --- /dev/null +++ b/test cases/fortran/2 modules/mymod.f90 @@ -0,0 +1,6 @@ +module circle +implicit none + +real, parameter :: pi = 4.*atan(1.) +real :: radius +end module circle diff --git a/test cases/fortran/2 modules/prog.f90 b/test cases/fortran/2 modules/prog.f90 index c3998cc..93b310f 100644 --- a/test cases/fortran/2 modules/prog.f90 +++ b/test cases/fortran/2 modules/prog.f90 @@ -1,7 +1,11 @@ -PROGRAM prog +use circle, only: pi +use line, only: length +implicit none -use Circle -IMPLICIT NONE +print *,'pi=',pi -END PROGRAM prog +length = pi +print *, length + +end program diff --git a/test cases/fortran/2 modules/stuff.f90 b/test cases/fortran/2 modules/stuff.f90 deleted file mode 100644 index 4a6399b..0000000 --- a/test cases/fortran/2 modules/stuff.f90 +++ /dev/null @@ -1,5 +0,0 @@ -MODULE Circle - REAL, PARAMETER :: Pi = 3.1415927 - REAL :: radius -END MODULE Circle - |