Changeset 116 for trunk/Forms
- Timestamp:
- Feb 15, 2022, 5:09:10 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormTest.lfm
r91 r116 48 48 TabOrder = 1 49 49 end 50 object LabelResult: TLabel 51 Left = 22 52 Height = 27 53 Top = 607 54 Width = 15 55 Anchors = [akLeft, akBottom] 56 Caption = ' ' 57 end 50 58 object ActionList1: TActionList 51 59 Left = 537 -
trunk/Forms/UFormTest.lrj
r91 r116 4 4 {"hash":93105204,"name":"tformtest.listviewtestcases.columns[1].caption","sourcebytes":[82,101,115,117,108,116],"value":"Result"}, 5 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":" "}, 6 7 {"hash":368487,"name":"tformtest.ashow.caption","sourcebytes":[83,104,111,119],"value":"Show"}, 7 8 {"hash":22974,"name":"tformtest.arun.caption","sourcebytes":[82,117,110],"value":"Run"} -
trunk/Forms/UFormTest.pas
r104 r116 18 18 ActionList1: TActionList; 19 19 ButtonRun: TButton; 20 LabelResult: TLabel; 20 21 ListViewTestCases: TListView; 21 22 MenuItem1: TMenuItem; … … 51 52 UCore, UFormTestCase, UContact; 52 53 54 resourcestring 55 SPassed = 'Passed'; 56 SFailed = 'Failed'; 57 53 58 { TFormTest } 54 59 … … 78 83 var 79 84 Selected: Boolean; 85 Passed: Integer; 86 Failed: Integer; 87 I: Integer; 80 88 begin 81 89 Selected := Assigned(ListViewTestCases.Selected); 82 90 ARun.Enabled := Selected; 83 91 AShow.Enabled := Selected; 92 93 Passed := 0; 94 Failed := 0; 95 for I := 0 to TestCases.Count - 1 do begin 96 case TestCases[I].Result of 97 trPassed: Inc(Passed); 98 trFailed: Inc(Failed); 99 end; 100 end; 101 LabelResult.Caption := SPassed + ' ' + IntToStr(Passed) + ', ' + 102 SFailed + ' ' + IntToStr(Failed); 84 103 end; 85 104 … … 101 120 Input := VCardBegin + LineEnding + 102 121 VCardVersion + LineEnding + 103 'NOTE:This is some long test which is really multi-lined each line is on d ' + LineEnding +104 ' ifferent line so it is on multiple lines.' + LineEnding +122 'NOTE:This is some long test which is really multi-lined each line is on dif' + LineEnding + 123 ' ferent line so it is on multiple lines.' + LineEnding + 105 124 VCardEnd + LineEnding; 106 125 Output := Input; … … 123 142 Input := VCardBegin + LineEnding + 124 143 VCardVersion + LineEnding + 125 'FN;ENCODING=QUOTED-PRINTABLE:Jm=C3=A9no=20P=C5=99=C3=ADjmen=C3=AD=' + LineEnding + 126 'Jm=C3=A9no=20P=C5=99=C3=ADjmen=C3=AD' + LineEnding + 127 VCardEnd + LineEnding; 128 Output := Input; 129 end; 130 //AddNew('Encoding base64', TTestCaseLoadSave); 131 //AddNew('Encoding quoted-printable', TTestCaseLoadSave); 144 'FN;ENCODING=QUOTED-PRINTABLE:Jm=C3=A9no=20P=C5=99=C3=ADjmen=C3=ADJm=C3=A9n=' + LineEnding + 145 'o=20P=C5=99=C3=ADjmen=C3=AD' + LineEnding + 146 VCardEnd + LineEnding; 147 Output := Input; 148 end; 149 with TTestCaseLoadSave(AddNew('Base64 load-save (encoding=base64)', TTestCaseLoadSave)) do begin 150 Input := VCardBegin + LineEnding + 151 VCardVersion + LineEnding + 152 'FN;ENCODING=BASE64:VGVzdCBzdHJpbmc=' + LineEnding + 153 VCardEnd + LineEnding; 154 Output := Input; 155 end; 156 with TTestCaseLoadSave(AddNew('Base64 load-save (base64)', TTestCaseLoadSave)) do begin 157 Input := VCardBegin + LineEnding + 158 VCardVersion + LineEnding + 159 'FN;BASE64:VGVzdCBzdHJpbmc=' + LineEnding + 160 VCardEnd + LineEnding; 161 Output := Input; 162 end; 163 with TTestCaseLoadSave(AddNew('Base64 load-save (encoding=b)', TTestCaseLoadSave)) do begin 164 Input := VCardBegin + LineEnding + 165 VCardVersion + LineEnding + 166 'FN;ENCODING=B:VGVzdCBzdHJpbmc=' + LineEnding + 167 VCardEnd + LineEnding; 168 Output := Input; 169 end; 170 with TTestCaseLoadSave(AddNew('Base64 load-save multi-line', TTestCaseLoadSave)) do begin 171 Input := VCardBegin + LineEnding + 172 VCardVersion + LineEnding + 173 'FN;ENCODING=BASE64:U29tZSB2ZXJ5IGxvbmcgc3RyaW5nIFNvbWUgdmVyeSBsb25nIHN0cmlu' + LineEnding + 174 ' ZyBTb21lIHZlcnkgbG9uZyBzdHJpbmcgU29tZSB2ZXJ5IGxvbmcgc3RyaW5n' + LineEnding + 175 VCardEnd + LineEnding; 176 Output := Input; 177 end; 132 178 //AddNew('Image format', TTestCaseLoadSave); 133 179 with TTestCaseLoadSave(AddNew('Empty', TTestCaseLoadSave)) do begin … … 153 199 Output := ''; 154 200 end; 155 with TTestCaseCheckProperty(AddNew('Proper y FN', TTestCaseCheckProperty)) do begin201 with TTestCaseCheckProperty(AddNew('Property FN', TTestCaseCheckProperty)) do begin 156 202 Index := cfFullName; 157 203 Value := 'Name Surname'; … … 185 231 VCardEnd + LineEnding; 186 232 end; 233 with TTestCaseCheckProperty(AddNew('Base64 special symbols', TTestCaseCheckProperty)) do begin 234 Index := cfFullName; 235 Value := 'Jméno Příjmení'; 236 Input := VCardBegin + LineEnding + 237 VCardVersion + LineEnding + 238 'FN;ENCODING=BASE64:Sm3DqW5vIFDFmcOtam1lbsOt' + LineEnding + 239 VCardEnd + LineEnding; 240 end; 187 241 end; 188 242 end; … … 200 254 TestCases[I].Run; 201 255 ReloadList; 256 UpdateInterface; 202 257 end; 203 258 … … 219 274 TTestCase(ListViewTestCases.Selected.Data).Run; 220 275 ReloadList; 276 UpdateInterface; 221 277 end; 222 278 end;
Note:
See TracChangeset
for help on using the changeset viewer.