mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 00:20:22 +02:00
tests: fixed preferredsize test
git-svn-id: trunk@29018 -
This commit is contained in:
parent
10fc2e0c0c
commit
b5f51f80d2
@ -36,6 +36,7 @@ begin
|
|||||||
GroupBox1:=TGroupBox.Create(Form1);
|
GroupBox1:=TGroupBox.Create(Form1);
|
||||||
GroupBox1.SetBounds(10,10,100,100);
|
GroupBox1.SetBounds(10,10,100,100);
|
||||||
GroupBox1.Parent:=Form1;
|
GroupBox1.Parent:=Form1;
|
||||||
|
GroupBox1.Caption:='GroupBox1';
|
||||||
Form1.Show;
|
Form1.Show;
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
|
|
||||||
@ -43,14 +44,14 @@ begin
|
|||||||
w1:=0;
|
w1:=0;
|
||||||
h1:=0;
|
h1:=0;
|
||||||
GroupBox1.GetPreferredSize(w1,h1,true,false);
|
GroupBox1.GetPreferredSize(w1,h1,true,false);
|
||||||
writeln('TTestPreferredSize.TestGroupBox1 ',w1,',',h1);
|
//writeln('TTestPreferredSize.TestGroupBox1 ',w1,',',h1);
|
||||||
|
|
||||||
// get the preferredsize of the groupbox with a size of 10x100
|
// get the preferredsize of the groupbox with a size of 10x100
|
||||||
GroupBox1.SetBounds(10,10,10,100);
|
GroupBox1.Width:=10;
|
||||||
w2:=0;
|
w2:=0;
|
||||||
h2:=0;
|
h2:=0;
|
||||||
GroupBox1.GetPreferredSize(w2,h2,true,false);
|
GroupBox1.GetPreferredSize(w2,h2,true,false);
|
||||||
writeln('TTestPreferredSize.TestGroupBox1 ',w2,',',h2);
|
//writeln('TTestPreferredSize.TestGroupBox1 ',w2,',',h2);
|
||||||
|
|
||||||
// the preferredsize must be independent of the the current width,height
|
// the preferredsize must be independent of the the current width,height
|
||||||
AssertEquals('TGroupBox.PreferredSize changed after SetBounds: ',true,(w1=w2) and (h1=h2));
|
AssertEquals('TGroupBox.PreferredSize changed after SetBounds: ',true,(w1=w2) and (h1=h2));
|
||||||
|
Loading…
Reference in New Issue
Block a user