codetools: tests: added guesstype of copy()

git-svn-id: trunk@54820 -
This commit is contained in:
mattias 2017-05-07 09:13:12 +00:00
parent 8143524542
commit a8b27bfd5e
3 changed files with 23 additions and 0 deletions
.gitattributes
components/codetools/tests

1
.gitattributes vendored
View File

@ -994,6 +994,7 @@ components/codetools/tests/moduletests/fdt_classhelper.pas svneol=native#text/pl
components/codetools/tests/moduletests/fdt_classof.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_for_in.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_generics.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_guesstype1.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_nestedclasses.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_objccategory.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_objcclass.pas svneol=native#text/plain

View File

@ -0,0 +1,16 @@
program fdt_guesstype1;
{$mode objfpc}{$H+}
uses
Classes, SysUtils;
procedure DoIt(s: string);
begin
i{guesstype:integer}:=length(s);
d{guesstype:string}:=copy(s,1,3);
end;
begin
end.

View File

@ -94,6 +94,7 @@ type
procedure TestFindDeclaration_FileAtCursor;
procedure TestFindDeclaration_CBlocks;
procedure TestFindDeclaration_Arrays;
procedure TestFindDeclaration_GuessType;
// test all files in directories:
procedure TestFindDeclaration_FPCTests;
procedure TestFindDeclaration_LazTests;
@ -698,6 +699,11 @@ begin
FindDeclarations('moduletests/fdt_arrays.pas');
end;
procedure TTestFindDeclaration.TestFindDeclaration_GuessType;
begin
FindDeclarations('moduletests/fdt_guesstype1.pas');
end;
procedure TTestFindDeclaration.TestFindDeclaration_FPCTests;
begin
TestFiles('fpctests');