Changeset 235 for branches/xpascal/Tests.pas
- Timestamp:
- Jun 27, 2023, 10:09:21 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xpascal/Tests.pas
r233 r235 155 155 Source.Add(' WriteLn(BoolToStr(IsZero(0)));'); 156 156 Source.Add(' WriteLn(BoolToStr(IsZero(1)));'); 157 Source.Add('end.'); 158 ExpectedOutput := '-1' + LineEnding + '0' + LineEnding; 159 end; 160 with TTestRun(Result.AddNew('function var parameter', TTestRun)) do begin 161 Source.Add('function Test(var A: Integer): Boolean;'); 162 Source.Add('begin'); 163 Source.Add(' A := 10;'); 164 Source.Add(' Result := True;'); 165 Source.Add('end;'); 166 Source.Add(''); 167 Source.Add('var'); 168 Source.Add(' B: Integer;'); 169 Source.Add('begin'); 170 Source.Add(' B := 1;'); 171 Source.Add(' Test(B);'); 172 Source.Add(' WriteLn(IntToStr(B));'); 157 173 Source.Add('end.'); 158 174 ExpectedOutput := '-1' + LineEnding + '0' + LineEnding;
Note:
See TracChangeset
for help on using the changeset viewer.