codetools: tests: added array test

git-svn-id: trunk@54728 -
This commit is contained in:
mattias 2017-04-25 09:52:08 +00:00
parent c5464ad7dc
commit fa480d0669
5 changed files with 36 additions and 2 deletions

1
.gitattributes vendored
View File

@ -987,6 +987,7 @@ components/codetools/tests/laztests/unit_order_test.pas svneol=native#text/plain
components/codetools/tests/laztests/unitdots.dot.pas svneol=native#text/plain
components/codetools/tests/laztests/unitdots.main.pas svneol=native#text/plain
components/codetools/tests/laztests/unitdots.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_arrays.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_basic.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_classhelper.pas svneol=native#text/plain
components/codetools/tests/moduletests/fdt_classof.pas svneol=native#text/plain

View File

@ -0,0 +1,23 @@
unit fdt_arrays;
{$mode objfpc}{$H+}
interface
type
TBird = class
public
Arr: array of longint;
end;
procedure DoIt;
implementation
procedure DoIt;
begin
end;
end.

View File

@ -37,7 +37,7 @@
<PackageName Value="fpcunitconsolerunner"/>
</Item2>
</RequiredPackages>
<Units Count="10">
<Units Count="11">
<Unit0>
<Filename Value="runtestscodetools.lpr"/>
<IsPartOfProject Value="True"/>
@ -85,6 +85,10 @@
<IsPartOfProject Value="True"/>
<UnitName Value="TestCTH2Pas"/>
</Unit9>
<Unit10>
<Filename Value="moduletests/fdt_arrays.pas"/>
<IsPartOfProject Value="True"/>
</Unit10>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -38,7 +38,7 @@ uses
{$ENDIF}
TestBasicCodetools,
TestCTRangeScan, TestPascalParser, TestMethodJumpTool, TestStdCodetools,
TestFindDeclaration, TestCompleteBlock, TestRefactoring;
TestFindDeclaration, TestCompleteBlock, TestRefactoring, fdt_arrays;
const
ConfigFilename = 'codetools.config';

View File

@ -93,6 +93,7 @@ type
procedure TestFindDeclaration_ForIn;
procedure TestFindDeclaration_FileAtCursor;
procedure TestFindDeclaration_CBlocks;
procedure TestFindDeclaration_Arrays;
// test all files in directories:
procedure TestFindDeclaration_FPCTests;
procedure TestFindDeclaration_LazTests;
@ -684,6 +685,11 @@ begin
ParseModule;
end;
procedure TTestFindDeclaration.TestFindDeclaration_Arrays;
begin
FindDeclarations('moduletests/fdt_arrays.pas');
end;
procedure TTestFindDeclaration.TestFindDeclaration_FPCTests;
begin
TestFiles('fpctests');