diff --git a/.gitattributes b/.gitattributes index cb789cd867..e1fbdfc2c7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8034,6 +8034,8 @@ test/customdrawn/lazdialogs_test.res -text test/customdrawn/mainform.lfm svneol=native#text/plain test/customdrawn/mainform.pas svneol=native#text/plain test/hello.ahk svneol=native#text/plain +test/ideintf/testmenuintf.lfm svneol=native#text/plain +test/ideintf/testmenuintf.pas svneol=native#text/plain test/lazutils/TestLazLogger.lpr svneol=native#text/pascal test/lazutils/testavglvltree.pas svneol=native#text/plain test/lazutils/testlazloggercase.pas svneol=native#text/pascal diff --git a/test/ideintf/testmenuintf.lfm b/test/ideintf/testmenuintf.lfm new file mode 100644 index 0000000000..01e5767078 --- /dev/null +++ b/test/ideintf/testmenuintf.lfm @@ -0,0 +1,17 @@ +object TestMenuIntfForm: TTestMenuIntfForm + Left = 287 + Height = 237 + Top = 215 + Width = 541 + Caption = 'TestMenuIntfForm' + Menu = TestMainMenuIntf1 + LCLVersion = '1.7' + object TestMainMenuIntf1: TMainMenu + left = 64 + top = 16 + end + object TestPopupMenuIntf1: TPopupMenu + left = 64 + top = 80 + end +end diff --git a/test/ideintf/testmenuintf.pas b/test/ideintf/testmenuintf.pas new file mode 100644 index 0000000000..6245cd77f3 --- /dev/null +++ b/test/ideintf/testmenuintf.pas @@ -0,0 +1,49 @@ +unit testmenuintf; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, fpcunit, FileUtil, LResources, Forms, Controls, Graphics, + Dialogs, Menus, MenuIntf, testglobals; + +type + + { TTestMenuIntfForm } + + TTestMenuIntfForm = class(TForm) + TestMainMenuIntf1: TMainMenu; + TestPopupMenuIntf1: TPopupMenu; + private + public + end; + + { TMenuIntfTest } + + TTestMenuIntf = class(TTestCase) + public + published + procedure TestMainMenu; + end; + +var + TestMenuIntfForm: TTestMenuIntfForm; + +implementation + +{$R *.lfm} + + +{ TMenuIntfTest } + +procedure TTestMenuIntf.TestMainMenu; +begin + +end; + +initialization + AddToIDEIntfTestSuite(TTestMenuIntf); + +end. + diff --git a/test/runtestsgui.lpi b/test/runtestsgui.lpi index c729ccb5cb..ef755c22e1 100644 --- a/test/runtestsgui.lpi +++ b/test/runtestsgui.lpi @@ -10,6 +10,7 @@ + <ResourceType Value="res"/> </General> <BuildModes Count="1"> <Item1 Name="default" Default="True"/> @@ -25,24 +26,27 @@ <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> </local> </RunParams> - <RequiredPackages Count="5"> + <RequiredPackages Count="6"> <Item1> - <PackageName Value="LazMouseAndKeyInput"/> + <PackageName Value="IDEIntf"/> </Item1> <Item2> - <PackageName Value="LCL"/> + <PackageName Value="LazMouseAndKeyInput"/> </Item2> <Item3> - <PackageName Value="FPCUnitTestRunner"/> + <PackageName Value="LCL"/> </Item3> <Item4> - <PackageName Value="FCL"/> + <PackageName Value="FPCUnitTestRunner"/> </Item4> <Item5> - <PackageName Value="CodeTools"/> + <PackageName Value="FCL"/> </Item5> + <Item6> + <PackageName Value="CodeTools"/> + </Item6> </RequiredPackages> - <Units Count="14"> + <Units Count="15"> <Unit0> <Filename Value="runtestsgui.lpr"/> <IsPartOfProject Value="True"/> @@ -66,7 +70,6 @@ <Unit5> <Filename Value="testunits.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="testunits"/> </Unit5> <Unit6> <Filename Value="bugs\testfileproc.pas"/> @@ -83,17 +86,14 @@ <Unit9> <Filename Value="semiauto\semiautotest.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="semiautotest"/> </Unit9> <Unit10> <Filename Value="semiauto\idesemiautotests.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="idesemiautotests"/> </Unit10> <Unit11> <Filename Value="semiauto\lclsemiautotests.pas"/> <IsPartOfProject Value="True"/> - <UnitName Value="lclsemiautotests"/> </Unit11> <Unit12> <Filename Value="lazutils\testlazutils.pas"/> @@ -104,6 +104,12 @@ <IsPartOfProject Value="True"/> <UnitName Value="TestPageControl"/> </Unit13> + <Unit14> + <Filename Value="ideintf\testmenuintf.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="TestMenuIntfForm"/> + <ResourceBaseClass Value="Form"/> + </Unit14> </Units> </ProjectOptions> <CompilerOptions> @@ -113,7 +119,7 @@ <Filename Value="runtestsgui"/> </Target> <SearchPaths> - <OtherUnitFiles Value="bugs;codetoolstests;lcltests;semiauto;lazutils"/> + <OtherUnitFiles Value="bugs;codetoolstests;lcltests;semiauto;lazutils;ideintf"/> <UnitOutputDirectory Value="unitsgui\$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> diff --git a/test/runtestsgui.lpr b/test/runtestsgui.lpr index 26db818f8a..ffc51b4dc3 100644 --- a/test/runtestsgui.lpr +++ b/test/runtestsgui.lpr @@ -23,12 +23,13 @@ program runtestsgui; uses Interfaces, Forms, GuiTestRunner, lazmouseandkeyinput, - testunits, TestLazUtils; + testunits, TestLazUtils, testmenuintf; begin Application.Title:='Run Lazarus tests'; Application.Initialize; Application.CreateForm(TGuiTestRunner, TestRunner); + Application.CreateForm(TTestMenuIntfForm, TestMenuIntfForm); Application.Run; end. diff --git a/test/testglobals.pas b/test/testglobals.pas index a3a1acf52d..77e3ea9eb1 100644 --- a/test/testglobals.pas +++ b/test/testglobals.pas @@ -33,6 +33,7 @@ var LazUtilsTestSuite: TTestSuite; CodetoolsTestSuite: TTestSuite; LCLTestSuite: TTestSuite; + IDEIntfTestSuite: TTestSuite; SemiAutoTestSuite: TTestSuite; // reads the output from a process and puts it in a memory stream @@ -42,6 +43,7 @@ procedure AddToBugsTestSuite(ATest: TTest); procedure AddToLazUtilsTestSuite(ATestClass: TClass); procedure AddToCodetoolsTestSuite(ATestClass: TClass); procedure AddToLCLTestSuite(ATestClass: TClass); +procedure AddToIDEIntfTestSuite(ATestClass: TClass); procedure AddToSemiAutoTestSuite(ATestClass: TClass); implementation @@ -115,6 +117,11 @@ begin LCLTestSuite.AddTestSuiteFromClass(ATestClass); end; +procedure AddToIDEIntfTestSuite(ATestClass: TClass); +begin + IDEIntfTestSuite.AddTestSuiteFromClass(ATestClass); +end; + procedure AddToSemiAutoTestSuite(ATestClass: TClass); begin SemiAutoTestSuite.AddTestSuiteFromClass(ATestClass); @@ -130,6 +137,8 @@ initialization GetTestRegistry.AddTest(CodetoolsTestSuite); LCLTestSuite := TTestSuite.Create('LCL tests'); GetTestRegistry.AddTest(LCLTestSuite); + IDEIntfTestSuite := TTestSuite.Create('IDEIntf tests'); + GetTestRegistry.AddTest(IDEIntfTestSuite); SemiAutoTestSuite := TTestSuite.Create('Semi Automatic tests'); GetTestRegistry.AddTest(SemiAutoTestSuite);