Codetools: Tests for: Keep empty () on code completion. Issue #39712.

This commit is contained in:
Pascal Riekenberg 2022-07-06 22:33:47 +02:00
parent 781955e856
commit d5951070d0

View File

@ -40,6 +40,8 @@ type
procedure TestCompleteProperty_GenericObjFPC;
procedure TestCompleteProperty_GenericDelphi;
procedure TestCompleteVariableWithSpecializedType;
procedure TestCompleteMethodSignature_Empty_Parentheses;
procedure TestCompleteMethodSignature_Without_Parentheses;
end;
implementation
@ -856,6 +858,48 @@ begin
'end.']);
end;
procedure TTestCodeCompletion.TestCompleteMethodSignature_Empty_Parentheses;
begin
Test('TestCompleteMethodSignature_Empty_Parentheses',
['unit SomeUnit;'
,'{$MODE OBJFPC}'
,'interface'
,'procedure Foo();'
,'implementation'
,'end.'],
4,1,
['unit SomeUnit;'
,'{$MODE OBJFPC}'
,'interface'
,'procedure Foo();'
,'implementation'
,'procedure Foo();'
,'begin'
,'end;'
,'end.']);
end;
procedure TTestCodeCompletion.TestCompleteMethodSignature_Without_Parentheses;
begin
Test('TestCompleteMethodSignature_Without_Parentheses',
['unit SomeUnit;'
,'{$MODE OBJFPC}'
,'interface'
,'procedure Foo;'
,'implementation'
,'end.'],
4,1,
['unit SomeUnit;'
,'{$MODE OBJFPC}'
,'interface'
,'procedure Foo;'
,'implementation'
,'procedure Foo;'
,'begin'
,'end;'
,'end.']);
end;
initialization
RegisterTests([TTestCodeCompletion]);