[geany/geany] 5965b5: Fortran: add a few more test cases
Adam Hirst
git-noreply at xxxxx
Sun Feb 23 19:16:29 UTC 2014
Branch: refs/heads/master
Author: Adam Hirst <adam at aphirst.karoo.co.uk>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 23 Feb 2014 19:16:29 UTC
Commit: 5965b5ebd3797b846ff3b92e9a5079d0834537f1
https://github.com/geany/geany/commit/5965b5ebd3797b846ff3b92e9a5079d0834537f1
Log Message:
-----------
Fortran: add a few more test cases
Modified Paths:
--------------
tests/ctags/Makefile.am
tests/ctags/block.f90
tests/ctags/block.f90.tags
tests/ctags/interfaces.f90
tests/ctags/interfaces.f90.tags
Modified: tests/ctags/Makefile.am
2 files changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -20,6 +20,7 @@ test_sources = \
attributes.cs \
auto.f \
bit_field.c \
+ block.f90 \
bracematch.js \
bug1020715.cpp \
bug1020715.c \
@@ -140,6 +141,7 @@ test_sources = \
initialization.f90 \
interface_indexers.cs \
interface_properties.cs \
+ interfaces.f90 \
internal.cs \
intro_orig.tex \
intro.tex \
Modified: tests/ctags/block.f90
51 files changed, 51 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,51 @@
+module Blocks
+ implicit none
+
+ integer :: i
+
+contains
+
+ function MyFunc(thing)
+ integer, intent(in) :: thing
+ integer :: myfunc
+
+ block
+ ! these obviously won't show up, because variables inside functions inside modules don't anyway
+ ! and that's fine
+ integer :: tempint
+ tempint = 1
+ if (tempint == 1) then
+ tempint = 2
+ end if
+ myfunc = tempint
+ end block
+
+ end function MyFunc
+
+end module Blocks
+
+program Main
+ use Blocks
+
+ implicit none
+
+ ! these variable declarations should definitely show up in the symbol list
+ integer :: otherint, moreint
+
+ otherint = 3
+
+ block
+ ! These shouldn't, because...
+ integer :: newtempint
+
+ newtempint = 2
+ block
+ ! ...the damn things can be arbitrarily nested!
+ integer :: newer_int
+
+ newer_int = 3
+ end block
+ newtempint = 2 * newtempint
+ end block
+
+end program Main
Modified: tests/ctags/block.f90.tags
7 files changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,7 @@
+# format=tagmanager
+BlocksÌ256Ö0
+MainÌ2048Ö0
+MyFuncÌ16ÎBlocksÖ0
+iÌ16384ÎBlocksÖ0
+moreintÌ16384ÎMainÖ0
+otherintÌ16384ÎMainÖ0
Modified: tests/ctags/interfaces.f90
45 files changed, 45 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,45 @@
+module HasInterfaces
+ ! INTERFACE blocks can have names
+ ! usually only used for when overloading, but good practice anyway!
+ interface MyFunc
+ function Func1(arg)
+ integer :: arg
+ end function Func1
+
+ function Func2(arg)
+ integer :: arg
+ end function Func2
+ end interface MyFunc
+
+ ! without a name we just use a generic one
+ interface
+ subroutine CHEEV(...)
+ ! ...
+ end subroutine CHEEV
+ end interface
+
+contains
+
+ function Func1(arg)
+ integer :: arg, func1
+ func1 = arg
+ end function Func1
+
+ function Func2(arg)
+ integer :: arg, func2
+ func2 = arg
+ end function Func2
+
+end module HasInterfaces
+
+program Main
+ use HasInterfaces
+
+ ! can also occur in PROGRAMs
+ interface MySubroutine
+ subroutine Sub1(arg)
+ ! ...
+ end subroutine Sub1
+ end interface MySubroutine
+
+end program Main
Modified: tests/ctags/interfaces.f90.tags
8 files changed, 8 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,8 @@
+# format=tagmanager
+Func1Ì16ÎHasInterfacesÖ0
+Func2Ì16ÎHasInterfacesÖ0
+HasInterfacesÌ256Ö0
+Interface#0Ì32ÎHasInterfacesÖ0
+MainÌ2048Ö0
+MyFuncÌ32ÎHasInterfacesÖ0
+MySubroutineÌ32ÎMainÖ0
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list