add fortran module inline comment test

pull/5516/head
Michael Hirsch, Ph.D 5 years ago
parent 2106a6020c
commit f7465c0887
  1. 6
      test cases/fortran/2 modules/comment_mod.f90
  2. 2
      test cases/fortran/2 modules/meson.build
  3. 6
      test cases/fortran/2 modules/mymod.f90
  4. 12
      test cases/fortran/2 modules/prog.f90
  5. 5
      test cases/fortran/2 modules/stuff.f90

@ -0,0 +1,6 @@
module line! inline comment
implicit none
real :: length
end module line

@ -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)

@ -0,0 +1,6 @@
module circle
implicit none
real, parameter :: pi = 4.*atan(1.)
real :: radius
end module circle

@ -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

@ -1,5 +0,0 @@
MODULE Circle
REAL, PARAMETER :: Pi = 3.1415927
REAL :: radius
END MODULE Circle
Loading…
Cancel
Save