Examples: Start completely rewrting the TestAll apllication.

git-svn-id: trunk@51824 -
This commit is contained in:
bart 2016-03-04 15:05:52 +00:00
parent 636fa40d72
commit 87791326d0
5 changed files with 715 additions and 5370 deletions

1
.gitattributes vendored
View File

@ -5603,6 +5603,7 @@ examples/taborder.pas svneol=native#text/pascal
examples/testall.lpi svneol=native#text/plain
examples/testall.pp svneol=native#text/pascal
examples/testallform.pp svneol=native#text/pascal
examples/testallform_include.inc svneol=native#text/plain
examples/testtools.inc svneol=native#text/pascal
examples/toolbar.lpi svneol=native#text/plain
examples/toolbar.pp svneol=native#text/pascal

View File

@ -2,33 +2,42 @@
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InIDEConfig"/>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="testall"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="2">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<PathDelim Value="\"/>
<Target>
<Filename Value="testall"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
<OptimizationLevel Value="2"/>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
<UseLineInfoUnit Value="False"/>
<StripSymbols Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
@ -42,14 +51,10 @@
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
@ -57,27 +62,35 @@
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="2">
<Units Count="3">
<Unit0>
<Filename Value="testall.pp"/>
<Filename Value="testall.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="TestAll"/>
</Unit0>
<Unit1>
<Filename Value="testallform.pp"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestAllForm"/>
</Unit1>
<Unit2>
<Filename Value="testallform_include.inc"/>
<IsPartOfProject Value="True"/>
</Unit2>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<PathDelim Value="\"/>
<Target>
<Filename Value="testall"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
@ -88,10 +101,21 @@
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,314 @@
{%mainunit testallform.pp}
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
}
const
AppTitle = 'Test Many (but not all) Components';
AboutMsg = 'A little test suite to test many (but not all) components' + LineEnding +
'of Lazarus.' + LineEnding + LineEnding +
'This test suite aims neither to be complete, nor to be free of bugs.' + LineEnding +
LineEnding +
'Feel free to report bugs and other shortcomings on the Lazarus bugtracker.';
type
taComponents = (
tacTarrow,
tacTbitbtn,
tacTbutton,
tacTbuttonpanel,
tacTcalcedit,
tacTcalendar,
tacTcheckbox,
tacTcheckcombobox,
tacTcheckgroup,
tacTchecklistbox,
tacTcolorbox,
tacTcolorbutton,
tacTcolorlistbox,
tacTcombobox,
tacTcomboboxex,
tacTcontrolbar,
tacTcoolbar,
tacTdateedit,
tacTdirectoryedit,
tacTedit,
tacTeditbutton,
tacTfilelistbox,
tacTfilenameedit,
tacTfiltercombobox,
tacTfloatspinedit,
tacTgroupbox,
tacTheadercontrol,
tacTimage,
tacTlabel,
tacTlabelededit,
tacTlistbox,
tacTlistview,
tacTmaskedit,
tacTmemo,
tacTnotebook,
tacTpagecontrol,
tacTpaintbox,
tacTpanel,
tacTprogressbar,
tacTradiobutton,
tacTradiogroup,
tacTshape,
tacTshelllistview,
tacTshelltreeview,
tacTspeedbutton,
tacTspinedit,
tacTsplitter,
tacTstacTictext,
tacTstatusbar,
tacTstringgrid,
tacTtabcontrol,
tacTtimeedit,
tacTtimer,
tacTtogglebox,
tacTtoolbar,
tacTtrackbar,
tacTtreeview,
tacTupdown,
tacTvaluelisteditor
);
taDialogs = (
tadTcalculatordialog,
tadTcalendardialog,
tadTcolordialog,
tadTfinddialog,
tadTfontdialog,
tadTMessageDialog,
tadTopendialog,
tadTopenpicturedialog,
tadTreplacedialog,
tadTsavedialog,
tadTsavepicturedialog,
tadTselectdirectorydialog,
tadTQuesionDialog
);
const
tagCompStart = $1000;
tagDlgStart = $10000;
taCompImplemented: Array[taComponents] of Boolean = (
True, //tacTarrow,
True, //tacTbitbtn,
False, //tacTbutton,
False, //tacTbuttonpanel,
False, //tacTcalcedit,
False, //tacTcalendar,
False, //tacTcheckbox,
False, //tacTcheckcombobox,
False, //tacTcheckgroup,
False, //tacTchecklistbox,
False, //tacTcolorbox,
False, //tacTcolorbutton,
False, //tacTcolorlistbox,
False, //tacTcombobox,
False, //tacTcomboboxex,
False, //tacTcontrolbar,
False, //tacTcoolbar,
False, //tacTdateedit,
False, //tacTdirectoryedit,
False, //tacTedit,
False, //tacTeditbutton,
False, //tacTfilelistbox,
False, //tacTfilenameedit,
False, //tacTfiltercombobox,
False, //tacTfloatspinedit,
False, //tacTgroupbox,
False, //tacTheadercontrol,
False, //tacTimage,
False, //tacTlabel,
False, //tacTlabelededit,
False, //tacTlistbox,
False, //tacTlistview,
False, //tacTmaskedit,
False, //tacTmemo,
False, //tacTnotebook,
False, //tacTpagecontrol,
False, //tacTpaintbox,
False, //tacTpanel,
False, //tacTprogressbar,
False, //tacTradiobutton,
False, //tacTradiogroup,
False, //tacTshape,
False, //tacTshelllistview,
False, //tacTshelltreeview,
False, //tacTspeedbutton,
False, //tacTspinedit,
False, //tacTsplitter,
False, //tacTstacTictext,
False, //tacTstatusbar,
False, //tacTstringgrid,
False, //tacTtabcontrol,
False, //tacTtimeedit,
False, //tacTtimer,
False, //tacTtogglebox,
False, //tacTtoolbar,
False, //tacTtrackbar,
False, //tacTtreeview,
False, //tacTupdown,
False //tacTvaluelisteditor,
);
taDlgImplemented: Array[taDialogs] of Boolean = (
False, //tadTcalculatordialog,
False, //tadTcalendardialog,
False, //tadTcolordialog,
False, //tadTfinddialog,
False, //tadTfontdialog,
False, //tadTMessageDialog,
False, //tadTopendialog,
False, //tadTopenpicturedialog,
False, //tadTreplacedialog,
False, //tadTsavedialog,
False, //tadTsavepicturedialog,
False, //tadTselectdirectorydialog,
False //tadTQuesionDialog
);
taCompNames: Array[taComponents] of String = (
'Tarrow',
//False, // //tacTbevel,
'Tbitbtn',
//False, // //tacTbufdataset,
'Tbutton',
'Tbuttonpanel',
'Tcalcedit',
'Tcalendar',
'Tcheckbox',
'Tcheckcombobox',
'Tcheckgroup',
'Tchecklistbox',
'Tcolorbox',
'Tcolorbutton',
'Tcolorlistbox',
'Tcombobox',
'Tcomboboxex',
'Tcontrolbar',
'Tcoolbar',
//False, // //tacTdatasource,
'Tdateedit',
//False, // //tacTdbcalendar,
//False, // //tacTdbcheckbox,
//False, // //tacTdbcombobox,
//False, // //tacTdbedit,
//False, // //tacTdbdateedit,
//False, // //tacTdbgrid,
//False, // //tacTdbgroupbox,
//False, // //tacTdbimage,
//False, // //tacTdblistbox,
//False, // //tacTdblookupcombobox,
//False, // //tacTdblookuplistbox,
//False, // //tacTdbmemo,
//False, // //tacTdbnavigator,
//False, // //tacTdbradiogroup,
//False, // //tacTdbtext,
'Tdirectoryedit',
//False, // //tacTdrawgrid,
'Tedit',
'Teditbutton',
//False, // //tacTeventlog,
'Tfilelistbox',
'Tfilenameedit',
'Tfiltercombobox',
'Tfloatspinedit',
//False, // //tacTflowpanel,
//False, // //tacTframe,
'Tgroupbox',
'Theadercontrol',
//False, // //tacThtmlbrowserhelpviewer,
//False, // //tacThtmlhelpdatabase,
//False, // //tacTidedialoglayoutstorage,
//False, // //tacTidletimer,
'Timage',
//False, // //tacTimagelist,
//False, // //tacTinipropstorage,
'Tlabel',
'Tlabelededit',
//False, // //tacTlazcomponentqueue,
'Tlistbox',
'Tlistview',
//False, // //tacTmainmenu,
'Tmaskedit',
'Tmemo',
//False, // //tacTmouse,
'Tnotebook',
'Tpagecontrol',
'Tpaintbox',
//False, // //tacTpairsplitter,
'Tpanel',
//False, // //tacTpicture,
//False, // //tacTpopupmenu,
//False, // //tacTpopupnotifier,
//False, // //tacTprocess,
//False, // //tacTprocessutf8,
'Tprogressbar',
'Tradiobutton',
'Tradiogroup',
//False, // //tacTscrollbar,
//False, // //tacTscrollbox,
//False, // //tacTservicemanager,
'Tshape',
'Tshelllistview',
'Tshelltreeview',
//False, // //tacTsimpleipcclient,
//False, // //tacTsimpleipcserver,
'Tspeedbutton',
'Tspinedit',
'Tsplitter',
'TstacTictext',
'Tstatusbar',
'Tstringgrid',
'Ttabcontrol',
'Ttimeedit',
'Ttimer',
'Ttogglebox',
'Ttoolbar',
'Ttrackbar',
//False, // //tacTtrayicon,
'Ttreeview',
'Tupdown',
'Tvaluelisteditor'
//False, // //tacTxmlconfig,
//False, // //tacTxmlpropstorage
);
taDlgNames: Array[taDialogs] of String = (
'CalculatorDialog',
'CalendarDialog',
'ColorDialog',
'FindDialog',
'FontDialog',
'MessageDialog',
'OpenDialog',
'OpenpictureDialog',
'ReplaceDialog',
'SaveDialog',
'SavepictureDialog',
'SelectdirectoryDialog',
'QuesionDialog'
);

File diff suppressed because it is too large Load Diff