Changeset 229
- Timestamp:
- Jun 24, 2023, 11:23:26 PM (18 months ago)
- Location:
- branches/xpascal
- Files:
-
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xpascal/Executor.pas
r224 r229 632 632 if TValueBoolean(Value).Value then ExecuteCommand(Block, IfThenElse.CommandThen) 633 633 else begin 634 if not (IfThenElse.CommandElse is TCommand) then634 if Assigned(IfThenElse.CommandElse) then 635 635 ExecuteCommand(Block, IfThenElse.CommandElse); 636 636 end; -
branches/xpascal/Forms/FormMain.lfm
r228 r229 123 123 Caption = 'Test' 124 124 OnExecute = ATestExecute 125 ShortCut = 122 125 126 end 126 127 end -
branches/xpascal/Forms/FormMain.pas
r228 r229 75 75 uses 76 76 Parser, Executor, GeneratorPascal, GeneratorPhp, FormTests, Translator, 77 GeneratorCSharp, GeneratorXml, ParserPascal ;77 GeneratorCSharp, GeneratorXml, ParserPascal, Tests; 78 78 79 79 { TFormMain } … … 198 198 with TFormTests.Create(nil) do 199 199 try 200 TestCases := GetTests; 200 201 ShowModal; 201 202 finally 203 TestCases.Free; 202 204 Free; 203 205 end; -
branches/xpascal/Packages/Common/Common.lpk
r228 r229 43 43 <License Value="Copy left."/> 44 44 <Version Minor="11"/> 45 <Files Count="3 7">45 <Files Count="36"> 46 46 <Item1> 47 47 <Filename Value="StopWatch.pas"/> … … 160 160 </Item26> 161 161 <Item27> 162 <Filename Value="AboutDialog.pas"/> 163 <HasRegisterProc Value="True"/> 164 <UnitName Value="AboutDialog"/> 162 <Filename Value="PixelPointer.pas"/> 163 <UnitName Value="PixelPointer"/> 165 164 </Item27> 166 165 <Item28> 167 <Filename Value=" PixelPointer.pas"/>168 <UnitName Value=" PixelPointer"/>166 <Filename Value="DataFile.pas"/> 167 <UnitName Value="DataFile"/> 169 168 </Item28> 170 169 <Item29> 171 <Filename Value=" DataFile.pas"/>172 <UnitName Value=" DataFile"/>170 <Filename Value="TestCase.pas"/> 171 <UnitName Value="TestCase"/> 173 172 </Item29> 174 173 <Item30> 175 <Filename Value=" TestCase.pas"/>176 <UnitName Value=" TestCase"/>174 <Filename Value="Generics.pas"/> 175 <UnitName Value="Generics"/> 177 176 </Item30> 178 177 <Item31> 179 <Filename Value="Generics.pas"/>180 <UnitName Value="Generics"/>181 </Item31>182 <Item32>183 178 <Filename Value="CommonPackage.pas"/> 184 179 <Type Value="Main Unit"/> 185 180 <UnitName Value="CommonPackage"/> 181 </Item31> 182 <Item32> 183 <Filename Value="Table.pas"/> 184 <UnitName Value="Table"/> 186 185 </Item32> 187 186 <Item33> 188 <Filename Value="Table.pas"/> 189 <UnitName Value="Table"/> 187 <Filename Value="FormEx.pas"/> 188 <HasRegisterProc Value="True"/> 189 <UnitName Value="FormEx"/> 190 190 </Item33> 191 191 <Item34> 192 <Filename Value="FormEx.pas"/> 193 <HasRegisterProc Value="True"/> 194 <UnitName Value="FormEx"/> 192 <Filename Value="Forms\FormTests.pas"/> 193 <UnitName Value="FormTests"/> 195 194 </Item34> 196 195 <Item35> 197 <Filename Value="Forms\FormTest s.pas"/>198 <UnitName Value="FormTest s"/>196 <Filename Value="Forms\FormTest.pas"/> 197 <UnitName Value="FormTest"/> 199 198 </Item35> 200 199 <Item36> 201 <Filename Value="Forms\FormTest.pas"/>202 <UnitName Value="FormTest"/>203 </Item36>204 <Item37>205 200 <Filename Value="Forms\FormAbout.pas"/> 206 201 <UnitName Value="FormAbout"/> 207 </Item3 7>202 </Item36> 208 203 </Files> 209 204 <CompatibilityMode Value="True"/> -
branches/xpascal/Packages/Common/CommonPackage.pas
r228 r229 13 13 XML, ApplicationInfo, SyncCounter, ListViewSort, PersistentForm, FindFile, 14 14 ScaleDPI, Theme, StringTable, MetaCanvas, Geometric, Translator, Languages, 15 AboutDialog, PixelPointer, DataFile, TestCase, Generics, Table, FormEx,16 FormTest s, FormTest, FormAbout, LazarusPackageIntf;15 PixelPointer, DataFile, TestCase, Generics, Table, FormEx, FormTests, 16 FormTest, FormAbout, LazarusPackageIntf; 17 17 18 18 implementation … … 31 31 RegisterUnit('Theme', @Theme.Register); 32 32 RegisterUnit('Translator', @Translator.Register); 33 RegisterUnit('AboutDialog', @AboutDialog.Register);34 33 RegisterUnit('FormEx', @FormEx.Register); 35 34 end; -
branches/xpascal/Packages/Common/Forms/FormAbout.lfm
r228 r229 1 1 object FormAbout: TFormAbout 2 Left = 10143 Height = 3494 Top = 5775 Width = 6092 Left = 624 3 Height = 402 4 Top = 622 5 Width = 702 6 6 Caption = 'About' 7 ClientHeight = 3498 ClientWidth = 6099 DesignTimePPI = 1 257 ClientHeight = 402 8 ClientWidth = 702 9 DesignTimePPI = 144 10 10 OnShow = FormShow 11 11 Position = poScreenCenter 12 LCLVersion = '2.2. 4.0'12 LCLVersion = '2.2.6.0' 13 13 object LabelDescription: TLabel 14 Left = 2615 Height = 2 216 Top = 1 1717 Width = 55714 Left = 30 15 Height = 26 16 Top = 135 17 Width = 642 18 18 Align = alTop 19 BorderSpacing.Left = 2620 BorderSpacing.Right = 2621 BorderSpacing.Bottom = 2619 BorderSpacing.Left = 30 20 BorderSpacing.Right = 30 21 BorderSpacing.Bottom = 30 22 22 Caption = 'Description' 23 23 ParentColor = False … … 26 26 end 27 27 object LabelContent: TLabel 28 Left = 2629 Height = 2 230 Top = 1 6531 Width = 55728 Left = 30 29 Height = 26 30 Top = 191 31 Width = 642 32 32 Align = alTop 33 BorderSpacing.Around = 2633 BorderSpacing.Around = 30 34 34 Caption = ' ' 35 35 ParentColor = False … … 38 38 object PanelTop: TPanel 39 39 Left = 0 40 Height = 1 1740 Height = 135 41 41 Top = 0 42 Width = 60942 Width = 702 43 43 Align = alTop 44 44 BevelOuter = bvNone 45 ClientHeight = 1 1746 ClientWidth = 60945 ClientHeight = 135 46 ClientWidth = 702 47 47 FullRepaint = False 48 48 ParentFont = False 49 49 TabOrder = 0 50 50 object LabelAppName: TLabel 51 Left = 9452 Height = 7353 Top = 1754 Width = 48951 Left = 108 52 Height = 84 53 Top = 20 54 Width = 564 55 55 Anchors = [akTop, akLeft, akRight] 56 56 AutoSize = False 57 BorderSpacing.Around = 2657 BorderSpacing.Around = 30 58 58 Caption = 'Title' 59 Font.Height = - 5259 Font.Height = -60 60 60 ParentColor = False 61 61 ParentFont = False … … 63 63 end 64 64 object ImageLogo: TImage 65 Left = 2 166 Height = 6467 Top = 2668 Width = 6265 Left = 24 66 Height = 74 67 Top = 30 68 Width = 71 69 69 Proportional = True 70 70 Stretch = True … … 73 73 object PanelButtons: TPanel 74 74 Left = 0 75 Height = 6576 Top = 28477 Width = 60975 Height = 75 76 Top = 327 77 Width = 702 78 78 Align = alBottom 79 79 BevelOuter = bvNone 80 ClientHeight = 6581 ClientWidth = 60980 ClientHeight = 75 81 ClientWidth = 702 82 82 TabOrder = 1 83 83 object ButtonHomePage: TButton 84 Left = 2 185 Height = 3 386 Top = 2 187 Width = 2 2984 Left = 24 85 Height = 38 86 Top = 24 87 Width = 264 88 88 Anchors = [akLeft, akBottom] 89 89 Caption = 'Home page' … … 93 93 end 94 94 object ButtonClose: TButton 95 Left = 46196 Height = 3 397 Top = 2 198 Width = 1 2295 Left = 531 96 Height = 38 97 Top = 24 98 Width = 141 99 99 Anchors = [akRight, akBottom] 100 100 Caption = 'Close' -
branches/xpascal/Packages/Common/Forms/FormAbout.pas
r228 r229 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 7 StdCtrls, ExtCtrls, ApplicationInfo, Common, Translator, Theme ;7 StdCtrls, ExtCtrls, ApplicationInfo, Common, Translator, Theme, FormEx; 8 8 9 9 type 10 10 { TFormAbout } 11 11 12 TFormAbout = class(TForm )12 TFormAbout = class(TFormEx) 13 13 ButtonClose: TButton; 14 14 ButtonHomePage: TButton; … … 21 21 procedure ButtonHomePageClick(Sender: TObject); 22 22 procedure FormShow(Sender: TObject); 23 private 24 FApplicationInfo: TApplicationInfo; 23 25 public 24 AboutDialog: TObject; //TAboutDialog25 26 procedure UpdateInterface; 27 property ApplicationInfo: TApplicationInfo read FApplicationInfo write 28 FApplicationInfo; 26 29 end; 27 30 … … 30 33 31 34 {$R *.lfm} 32 33 uses34 AboutDialog;35 35 36 36 resourcestring … … 43 43 procedure TFormAbout.FormShow(Sender: TObject); 44 44 begin 45 if Assigned(AboutDialog) then 46 with TAboutDialog(AboutDialog) do begin 47 if Assigned(Translator) then 48 Translator.TranslateComponentRecursive(Self); 49 if Assigned(ThemeManager) then 50 ThemeManager.UseTheme(Self); 51 52 if Assigned(ApplicationInfo) then 53 with ApplicationInfo do begin 54 LabelAppName.Caption := AppName; 55 LabelContent.Caption := SVersion + ': ' + Version + LineEnding + 56 SReleaseDate + ': ' + DateToStr(ReleaseDate) + LineEnding + 57 SLicense + ': ' + License; 58 LabelDescription.Caption := Description; 59 ImageLogo.Picture.Bitmap.Assign(Icon); 60 end; 45 if Assigned(ApplicationInfo) then 46 with ApplicationInfo do begin 47 LabelAppName.Caption := AppName; 48 LabelContent.Caption := SVersion + ': ' + Version + LineEnding + 49 SReleaseDate + ': ' + DateToStr(ReleaseDate) + LineEnding + 50 SLicense + ': ' + License; 51 LabelDescription.Caption := Description; 52 ImageLogo.Picture.Bitmap.Assign(Icon); 61 53 end; 62 54 UpdateInterface; … … 65 57 procedure TFormAbout.UpdateInterface; 66 58 begin 67 ButtonHomePage.Enabled := Assigned(AboutDialog) and 68 Assigned(TAboutDialog(AboutDialog).ApplicationInfo); 59 ButtonHomePage.Enabled := Assigned(ApplicationInfo); 69 60 end; 70 61 71 62 procedure TFormAbout.ButtonHomePageClick(Sender: TObject); 72 63 begin 73 OpenWebPage( TAboutDialog(AboutDialog).ApplicationInfo.HomePage);64 OpenWebPage(ApplicationInfo.HomePage); 74 65 end; 75 66 -
branches/xpascal/Packages/Common/Forms/FormTest.lfm
r228 r229 1 object FormTest Case: TFormTestCase1 object FormTest: TFormTest 2 2 Left = 579 3 3 Height = 521 4 4 Top = 468 5 5 Width = 865 6 Caption = 'Test case'6 Caption = 'Test' 7 7 ClientHeight = 521 8 8 ClientWidth = 865 9 9 DesignTimePPI = 144 10 OnClose = FormClose11 OnCreate = FormCreate12 OnShow = FormShow13 10 LCLVersion = '2.2.6.0' 14 11 object MemoLog: TMemo -
branches/xpascal/Packages/Common/Forms/FormTest.lrj
r228 r229 1 1 {"version":1,"strings":[ 2 {"hash": 174506581,"name":"tformtestcase.caption","sourcebytes":[84,101,115,116,32,99,97,115,101],"value":"Test case"}2 {"hash":371876,"name":"tformtest.caption","sourcebytes":[84,101,115,116],"value":"Test"} 3 3 ]} -
branches/xpascal/Packages/Common/Forms/FormTest.pas
r228 r229 8 8 type 9 9 10 { TFormTest Case}10 { TFormTest } 11 11 12 TFormTest Case= class(TFormEx)12 TFormTest = class(TFormEx) 13 13 MemoLog: TMemo; 14 14 end; -
branches/xpascal/Packages/Common/Forms/FormTests.lfm
r228 r229 4 4 Top = 338 5 5 Width = 1072 6 Caption = 'Test '6 Caption = 'Tests' 7 7 ClientHeight = 632 8 8 ClientWidth = 1072 -
branches/xpascal/Packages/Common/Forms/FormTests.lrj
r228 r229 1 1 {"version":1,"strings":[ 2 {"hash": 371876,"name":"tformtest.caption","sourcebytes":[84,101,115,116],"value":"Test"},3 {"hash":346165,"name":"tformtest .listviewtestcases.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"},4 {"hash":93105204,"name":"tformtest .listviewtestcases.columns[1].caption","sourcebytes":[82,101,115,117,108,116],"value":"Result"},5 {"hash":22974,"name":"tformtest .buttonrun.caption","sourcebytes":[82,117,110],"value":"Run"},6 {"hash":8736,"name":"tformtest .labelresult.caption","sourcebytes":[32,32,32],"value":" "},7 {"hash":368487,"name":"tformtest .ashow.caption","sourcebytes":[83,104,111,119],"value":"Show"},8 {"hash":22974,"name":"tformtest .arun.caption","sourcebytes":[82,117,110],"value":"Run"}2 {"hash":5950131,"name":"tformtests.caption","sourcebytes":[84,101,115,116,115],"value":"Tests"}, 3 {"hash":346165,"name":"tformtests.listviewtestcases.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"}, 4 {"hash":93105204,"name":"tformtests.listviewtestcases.columns[1].caption","sourcebytes":[82,101,115,117,108,116],"value":"Result"}, 5 {"hash":22974,"name":"tformtests.buttonrun.caption","sourcebytes":[82,117,110],"value":"Run"}, 6 {"hash":8736,"name":"tformtests.labelresult.caption","sourcebytes":[32,32,32],"value":" "}, 7 {"hash":368487,"name":"tformtests.ashow.caption","sourcebytes":[83,104,111,119],"value":"Show"}, 8 {"hash":22974,"name":"tformtests.arun.caption","sourcebytes":[82,117,110],"value":"Run"} 9 9 ]} -
branches/xpascal/Packages/Common/Forms/FormTests.pas
r228 r229 89 89 ARun.Enabled := Selected; 90 90 AShow.Enabled := Selected; 91 ButtonRun.Enabled := Assigned(TestCases); 91 92 92 93 Passed := 0; … … 116 117 begin 117 118 if Assigned(ListViewTestCases.Selected) then 118 with TFormTest Case.Create(nil) do119 with TFormTest.Create(nil) do 119 120 try 120 121 MemoLog.Text := TTestCase(ListViewTestCases.Selected.Data).Log; -
branches/xpascal/xpascal.lpi
r228 r229 85 85 </Item3> 86 86 </RequiredPackages> 87 <Units Count="1 7">87 <Units Count="18"> 88 88 <Unit0> 89 89 <Filename Value="xpascal.lpr"/> … … 166 166 <IsPartOfProject Value="True"/> 167 167 </Unit16> 168 <Unit17> 169 <Filename Value="Tests.pas"/> 170 <IsPartOfProject Value="True"/> 171 </Unit17> 168 172 </Units> 169 173 </ProjectOptions> -
branches/xpascal/xpascal.lpr
r228 r229 10 10 Forms, Parser, Tokenizer, Source, Executor, Interpreter, Generator, 11 11 FormMessages, FormSource, Optimizer, FormOutput, FormMain, 12 ParserPascal ;12 ParserPascal, Tests; 13 13 14 14 {$R *.res}
Note:
See TracChangeset
for help on using the changeset viewer.