mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:19:37 +02:00
Tests: test for PageControl, workaround QT and GTK do extra paint
git-svn-id: trunk@42694 -
This commit is contained in:
parent
426e526f9b
commit
e9ab40821e
@ -296,7 +296,7 @@ procedure TTestPageControl.CheckPaint(AName: String; APaintedPage: TTestSheet);
|
|||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
{$IfDef LCLQT}
|
{$IfDef LCLGTK2}
|
||||||
if APaintedPage <> nil then begin
|
if APaintedPage <> nil then begin
|
||||||
AssertTrue(AName + ' Paint was called', APaintedPage.DidPaint >= 1);
|
AssertTrue(AName + ' Paint was called', APaintedPage.DidPaint >= 1);
|
||||||
end;
|
end;
|
||||||
@ -304,7 +304,7 @@ begin
|
|||||||
if APaintedPage <> nil then begin
|
if APaintedPage <> nil then begin
|
||||||
AssertEquals(AName + ' Paint was called', 1, APaintedPage.DidPaint);
|
AssertEquals(AName + ' Paint was called', 1, APaintedPage.DidPaint);
|
||||||
end;
|
end;
|
||||||
{$IfNDef LCLGTK2}
|
{$IfNDef LCLQT}
|
||||||
for i := 0 to PageControl.ControlCount - 1 do
|
for i := 0 to PageControl.ControlCount - 1 do
|
||||||
if (PageControl.Controls[i] <> APaintedPage) and (PageControl.Controls[i] is TTestSheet) then
|
if (PageControl.Controls[i] <> APaintedPage) and (PageControl.Controls[i] is TTestSheet) then
|
||||||
AssertEquals(AName + 'NO paint for other page', 0, (PageControl.Controls[i] as TTestSheet).DidPaint);
|
AssertEquals(AName + 'NO paint for other page', 0, (PageControl.Controls[i] as TTestSheet).DidPaint);
|
||||||
|
Loading…
Reference in New Issue
Block a user