peter 21 vuotta sitten
vanhempi
commit
2bb1472ab5
2 muutettua tiedostoa jossa 89 lisäystä ja 0 poistoa
  1. 55 0
      tests/tbs/tb0479.pp
  2. 34 0
      tests/webtbs/tw3165.pp

+ 55 - 0
tests/tbs/tb0479.pp

@@ -0,0 +1,55 @@
+{$mode delphi}
+
+var
+  err : boolean;
+
+Type
+  {copy-paste from LibX.pas}
+  XInt                           = Longint;
+  XUInt                          = Longword;
+  XHandle                        = Pointer;
+  XFile                          = XHandle;
+  XFileMode                      = Set Of (
+    xFileModeRead,
+    xFileModeWrite
+  );
+  XResult                        = XInt;
+
+Type
+  TTest = Class(TObject)
+    Constructor Create(Out Result: XResult; Const Handle: XFile; Const Mode: XFileMode);
+  End;
+
+  TTest2 = Class(TTest)
+    Constructor Create(Out Result: XResult; Const FileName: AnsiString; Const Rights: XUInt); Overload;
+    Constructor Create(Out Result: XResult; Const FileName: AnsiString; Const Mode: XFileMode); Overload;
+  End;
+
+Constructor TTest.Create(Out Result: XResult; Const Handle: XFile; Const Mode: XFileMode);
+Begin
+  WriteLn('TTest Create');
+End;
+
+Constructor TTest2.Create(Out Result: XResult; Const FileName: AnsiString; Const Rights: XUInt);
+Begin
+  WriteLn('TTest2-1 Create');
+End;
+
+Constructor TTest2.Create(Out Result: XResult; Const FileName: AnsiString; Const Mode: XFileMode);
+Begin
+  WriteLn('TTest2-2 Create');
+  err:=false;
+End;
+
+Var
+  T : TTest;
+  C : PAnsiChar;
+  X : XResult;
+  M : XFileMode;
+Begin
+  err:=true;
+  C := 'Foo';
+  T := TTest2.Create(X, C, M);
+  if err then
+    halt(1);
+End.

+ 34 - 0
tests/webtbs/tw3165.pp

@@ -0,0 +1,34 @@
+{ Source provided for Free Pascal Bug Report 3165 }
+{ Submitted by "" on  2004-06-13 }
+{ e-mail: [email protected] }
+program testwith;
+
+{$ifdef fpc}{$mode objfpc}{$endif}
+
+uses
+  SysUtils;
+
+type
+  tconnect4game=class
+    board : array[1..7,0..5] of byte;
+  end;
+
+var
+  row ,col: byte;
+  g : tconnect4game;
+
+begin
+  {g := tconnect4game.create;}
+  with {g} tconnect4game.create do begin
+
+    writeln(board[1,5]);
+    row :=1;
+    col :=5;
+    writeln(board[col,row]);
+    for row := 5 downto 0 do begin
+      for col := 1 to 7 do begin
+        writeln(' :in inner loop row='+inttostr(row)+' col='+inttostr(col)+' board[col,row]='+inttostr(board[col,row]));
+      end;
+    end;
+  end;
+end.