mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 23:40:14 +02:00
fcl-passrc: added test unit not used through alias
This commit is contained in:
parent
d8fa6e6a9c
commit
435861b238
@ -99,6 +99,7 @@ type
|
|||||||
procedure TestM_Hint_UnitNotUsed_No_OnlyExternal;
|
procedure TestM_Hint_UnitNotUsed_No_OnlyExternal;
|
||||||
procedure TestM_Hint_UnitUsed;
|
procedure TestM_Hint_UnitUsed;
|
||||||
procedure TestM_Hint_UnitUsedVarArgs;
|
procedure TestM_Hint_UnitUsedVarArgs;
|
||||||
|
procedure TestM_Hint_UnitNotUsed_ClassInterfacesList;
|
||||||
procedure TestM_Hint_ParameterNotUsed;
|
procedure TestM_Hint_ParameterNotUsed;
|
||||||
procedure TestM_Hint_ParameterNotUsedOff;
|
procedure TestM_Hint_ParameterNotUsedOff;
|
||||||
procedure TestM_Hint_ParameterInOverrideNotUsed;
|
procedure TestM_Hint_ParameterInOverrideNotUsed;
|
||||||
@ -1629,6 +1630,39 @@ begin
|
|||||||
CheckUseAnalyzerUnexpectedHints;
|
CheckUseAnalyzerUnexpectedHints;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestUseAnalyzer.TestM_Hint_UnitNotUsed_ClassInterfacesList;
|
||||||
|
begin
|
||||||
|
AddModuleWithIntfImplSrc('unit2.pp',
|
||||||
|
LinesToStr([
|
||||||
|
'type',
|
||||||
|
' IUnknown = interface',
|
||||||
|
' end;',
|
||||||
|
' IBird = interface(IUnknown)',
|
||||||
|
' end;',
|
||||||
|
'']),
|
||||||
|
LinesToStr(['']));
|
||||||
|
|
||||||
|
AddModuleWithIntfImplSrc('unit3.pp',
|
||||||
|
LinesToStr([
|
||||||
|
'uses unit2;',
|
||||||
|
'type',
|
||||||
|
' IBird2 = unit2.IBird;',
|
||||||
|
'']),
|
||||||
|
LinesToStr(['']));
|
||||||
|
|
||||||
|
StartUnit(true,[supTObject]);
|
||||||
|
Add([
|
||||||
|
'interface',
|
||||||
|
'uses unit3;',
|
||||||
|
'type',
|
||||||
|
' TBird = class(TObject,IBird2)',
|
||||||
|
' end;',
|
||||||
|
'implementation',
|
||||||
|
'']);
|
||||||
|
AnalyzeUnit;
|
||||||
|
CheckUseAnalyzerUnexpectedHints;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTestUseAnalyzer.TestM_Hint_ParameterNotUsed;
|
procedure TTestUseAnalyzer.TestM_Hint_ParameterNotUsed;
|
||||||
begin
|
begin
|
||||||
StartProgram(true);
|
StartProgram(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user