codetools: tests for fpc test files

git-svn-id: trunk@49986 -
This commit is contained in:
mattias 2015-10-07 23:51:54 +00:00
parent 4f2150fbe0
commit 52790b06db

View File

@ -9,9 +9,7 @@
./finddeclarationtest --format=plain --suite=TestFindDeclaration_ObjCCategory ./finddeclarationtest --format=plain --suite=TestFindDeclaration_ObjCCategory
FPC tests: FPC tests:
./finddeclarationtest --format=plain --suite=TestFindDeclaration_tchlp41 ./finddeclarationtest --format=plain --suite=TestFindDeclaration_FPCTests
./finddeclarationtest --format=plain --suite=TestFindDeclaration_tchlp46
./finddeclarationtest --format=plain --suite=TestFindDeclaration_tchlp47
} }
unit fdtbase; unit fdtbase;
@ -24,7 +22,8 @@ interface
uses uses
Classes, SysUtils, CodeToolManager, ExprEval, CodeCache, BasicCodeTools, Classes, SysUtils, CodeToolManager, ExprEval, CodeCache, BasicCodeTools,
CustomCodeTool, CodeTree, FindDeclarationTool, KeywordFuncLists, CustomCodeTool, CodeTree, FindDeclarationTool, KeywordFuncLists,
IdentCompletionTool, LazLogger, LazFileUtils, fpcunit, testregistry; IdentCompletionTool, FileProcs, LazLogger, LazFileUtils, fpcunit,
testregistry;
type type
@ -42,9 +41,7 @@ type
procedure TestFindDeclaration_ObjCClass; procedure TestFindDeclaration_ObjCClass;
procedure TestFindDeclaration_ObjCCategory; procedure TestFindDeclaration_ObjCCategory;
{$ENDIF} {$ENDIF}
procedure TestFindDeclaration_tchlp41; procedure TestFindDeclaration_FPCTests;
procedure TestFindDeclaration_tchlp46;
procedure TestFindDeclaration_tchlp47;
end; end;
var var
@ -234,19 +231,19 @@ begin
end; end;
{$ENDIF} {$ENDIF}
procedure TTestFindDeclaration.TestFindDeclaration_tchlp41; procedure TTestFindDeclaration.TestFindDeclaration_FPCTests;
var
Info: TSearchRec;
aFilename: String;
begin begin
FindDeclarations('fpctests/tchlp41.pp'); if FindFirstUTF8('fpctests/t*.p*',faAnyFile,Info)=0 then begin
end; repeat
if faDirectory and Info.Attr>0 then continue;
procedure TTestFindDeclaration.TestFindDeclaration_tchlp46; aFilename:=Info.Name;
begin if not FilenameIsPascalUnit(aFilename) then continue;
FindDeclarations('fpctests/tchlp46.pp'); FindDeclarations('fpctests'+PathDelim+aFilename);
end; until FindNextUTF8(Info)<>0;
end;
procedure TTestFindDeclaration.TestFindDeclaration_tchlp47;
begin
FindDeclarations('fpctests/tchlp47.pp');
end; end;
initialization initialization