Forráskód Böngészése

* manual merge of lineendings

git-svn-id: branches/fixes_2_2@7508 -
peter 18 éve
szülő
commit
82b2979c50

+ 2 - 2
.gitattributes

@@ -7824,7 +7824,7 @@ tests/webtbs/tw3805.pp svneol=native#text/plain
 tests/webtbs/tw3812.pp svneol=native#text/plain
 tests/webtbs/tw3814.pp svneol=native#text/plain
 tests/webtbs/tw3827.pp svneol=native#text/plain
-tests/webtbs/tw3829.pp -text svneol=unset#text/plain
+tests/webtbs/tw3829.pp svneol=native#text/plain
 tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw3840.pp svneol=native#text/plain
 tests/webtbs/tw3841.pp svneol=native#text/plain
@@ -7930,7 +7930,7 @@ tests/webtbs/tw4529.pp -text svneol=unset#text/plain
 tests/webtbs/tw4533.pp svneol=native#text/plain
 tests/webtbs/tw4534.pp svneol=native#text/plain
 tests/webtbs/tw4537.pp svneol=native#text/plain
-tests/webtbs/tw4540.pp -text svneol=unset#text/plain
+tests/webtbs/tw4540.pp svneol=native#text/plain
 tests/webtbs/tw4541.pp svneol=native#text/plain
 tests/webtbs/tw4557.pp svneol=native#text/plain
 tests/webtbs/tw4566.pp -text svneol=unset#text/plain

+ 8 - 8
tests/webtbs/tw3700.pp

@@ -1,11 +1,11 @@
 { Source provided for Free Pascal Bug Report 3700 }
 { Submitted by "Roman" on  2005-02-26 }
-{ e-mail: [email protected] }
-uses
-  variants;
-var
-  v : olevariant;
+{ e-mail: [email protected] }
+uses
+  variants;
+var
+  v : olevariant;
   b : boolean;
-begin
-  b:=VarIsArray(V);
-end.
+begin
+  b:=VarIsArray(V);
+end.

+ 72 - 72
tests/webtbs/tw3997.pp

@@ -1,75 +1,75 @@
 { Source provided for Free Pascal Bug Report 3997 }
 { Submitted by "Dominique Louis" on  2005-05-21 }
-{ e-mail: [email protected] }
-
+{ e-mail: [email protected] }
+
 {$mode delphi}
-program Project1;
-
-{$APPTYPE CONSOLE}
-
-uses
-  SysUtils;
-
-type
-  TMyNotifyEvent =  procedure of object;
-
-  TMyBaseWindow = class( TObject )
-  private
-    FOnRender: TMyNotifyEvent;
-  public
-    property OnRender: TMyNotifyEvent read FOnRender write FOnRender;
-  end;
-
-  TBaseInterface = class( TObject )
-  protected
-    procedure Render; virtual; abstract;
-  public
-    MainWindow : TMyBaseWindow;
-    constructor Create;
-    destructor Destroy; override;
-    procedure ResetInputManager;
-  end;
-
-  TMyInterface = class( TBaseInterface )
-  protected
-    procedure Render; override;
-  end;
-
-
-{ TBaseInterface }
-constructor TBaseInterface.Create;
-begin
-  inherited;
-  WriteLn( 'TBaseInterface.Create' );
-  MainWindow := TMyBaseWindow.Create;
-  ResetInputManager;
-end;
-
-destructor TBaseInterface.Destroy;
-begin
-  MainWindow.Free;
-  inherited;
-end;
-
-procedure TBaseInterface.ResetInputManager;
-begin
-  WriteLn( 'ResetInputManager' );
-  MainWindow.OnRender := Render;
-end;
-
-{ TMyInterface }
-procedure TMyInterface.Render;
-begin
-  WriteLn( 'Rendering' );
-end;
-
-var
-  MyInterface : TMyInterface;
-
-begin
-  MyInterface := TMyInterface.Create;
-
-  MyInterface.Render;
-
-  MyInterface.Free;
-end.
+program Project1;
+
+{$APPTYPE CONSOLE}
+
+uses
+  SysUtils;
+
+type
+  TMyNotifyEvent =  procedure of object;
+
+  TMyBaseWindow = class( TObject )
+  private
+    FOnRender: TMyNotifyEvent;
+  public
+    property OnRender: TMyNotifyEvent read FOnRender write FOnRender;
+  end;
+
+  TBaseInterface = class( TObject )
+  protected
+    procedure Render; virtual; abstract;
+  public
+    MainWindow : TMyBaseWindow;
+    constructor Create;
+    destructor Destroy; override;
+    procedure ResetInputManager;
+  end;
+
+  TMyInterface = class( TBaseInterface )
+  protected
+    procedure Render; override;
+  end;
+
+
+{ TBaseInterface }
+constructor TBaseInterface.Create;
+begin
+  inherited;
+  WriteLn( 'TBaseInterface.Create' );
+  MainWindow := TMyBaseWindow.Create;
+  ResetInputManager;
+end;
+
+destructor TBaseInterface.Destroy;
+begin
+  MainWindow.Free;
+  inherited;
+end;
+
+procedure TBaseInterface.ResetInputManager;
+begin
+  WriteLn( 'ResetInputManager' );
+  MainWindow.OnRender := Render;
+end;
+
+{ TMyInterface }
+procedure TMyInterface.Render;
+begin
+  WriteLn( 'Rendering' );
+end;
+
+var
+  MyInterface : TMyInterface;
+
+begin
+  MyInterface := TMyInterface.Create;
+
+  MyInterface.Render;
+
+  MyInterface.Free;
+end.

+ 27 - 27
tests/webtbs/tw4229.pp

@@ -1,30 +1,30 @@
 { Source provided for Free Pascal Bug Report 4229 }
 { Submitted by "Gerhard" on  2005-07-28 }
 { e-mail: [email protected] }
-unit tw4229 ;
-
-interface
-
-  type
-    strobj = object
-               bs : string ;
-               ba : ansistring ;
-              end ;
-
-  operator := ( const a : ansistring ) z : strobj ;
-
-implementation
-
-  operator := ( const s : string ) z : strobj ;
-
-    begin
-      z.bs := s ;
-     end ;
-
-  operator := ( const a : ansistring ) z : strobj ;
-
-    begin
-      z.ba := a ;
-     end ;
-
-end.
+unit tw4229 ;
+
+interface
+
+  type
+    strobj = object
+               bs : string ;
+               ba : ansistring ;
+              end ;
+
+  operator := ( const a : ansistring ) z : strobj ;
+
+implementation
+
+  operator := ( const s : string ) z : strobj ;
+
+    begin
+      z.bs := s ;
+     end ;
+
+  operator := ( const a : ansistring ) z : strobj ;
+
+    begin
+      z.ba := a ;
+     end ;
+
+end.

+ 35 - 35
tests/webtbs/tw4487.pp

@@ -1,38 +1,38 @@
 { Source provided for Free Pascal Bug Report 4487 }
 { Submitted by "Phil H." on  2005-11-02 }
 { e-mail: [email protected] }
-program TestVarBug;
-
-{$IFDEF FPC}
-{$mode objfpc}
-uses
-  Variants;
-{$ENDIF}
-
-type
-  TMyClass = class
-  private
-    function GetValue(AsInt : Boolean) : Variant;
-  public
-    property Value[AsInt : Boolean] : Variant read GetValue;
-  end;
-  
-function TMyClass.GetValue(AsInt : Boolean) : Variant;
-begin
-  if AsInt then
-    Result := 1
-  else
-    Result := True;
-end;
-
-var
-  AClass : TMyClass;  
-begin
-  AClass := TMyClass.Create;
-  if (AClass.Value[True] = 1) and
-     AClass.Value[False] then  //Throws exception with FPC (requires "= True")
-    WriteLn('Value is True')
-  else
-    WriteLn('Value is False');
-end.
-
+program TestVarBug;
+
+{$IFDEF FPC}
+{$mode objfpc}
+uses
+  Variants;
+{$ENDIF}
+
+type
+  TMyClass = class
+  private
+    function GetValue(AsInt : Boolean) : Variant;
+  public
+    property Value[AsInt : Boolean] : Variant read GetValue;
+  end;
+
+function TMyClass.GetValue(AsInt : Boolean) : Variant;
+begin
+  if AsInt then
+    Result := 1
+  else
+    Result := True;
+end;
+
+var
+  AClass : TMyClass;
+begin
+  AClass := TMyClass.Create;
+  if (AClass.Value[True] = 1) and
+     AClass.Value[False] then  //Throws exception with FPC (requires "= True")
+    WriteLn('Value is True')
+  else
+    WriteLn('Value is False');
+end.
+

+ 22 - 22
tests/webtbs/tw4489.pp

@@ -1,25 +1,25 @@
 { Source provided for Free Pascal Bug Report 4489 }
 { Submitted by "Vincent Snijders" on  2005-11-04 }
 { e-mail: [email protected] }
-program Project1;
-
-{$mode objfpc}{$H+}
-
-uses
-  Classes, SysUtils
-  { add your units here };
-
-var
-  s: string;
-  u: SizeUInt;
-  d: qword;
-
-begin
-   d:=11111111;
-   u:=1111;
-   s := format('pid=%d', [u]);
-   writeln(s);
-   s := format('pid=%d', [d]);
-   writeln(s);
-end.
-    
+program Project1;
+
+{$mode objfpc}{$H+}
+
+uses
+  Classes, SysUtils
+  { add your units here };
+
+var
+  s: string;
+  u: SizeUInt;
+  d: qword;
+
+begin
+   d:=11111111;
+   u:=1111;
+   s := format('pid=%d', [u]);
+   writeln(s);
+   s := format('pid=%d', [d]);
+   writeln(s);
+end.
+

+ 46 - 46
tests/webtbs/tw4519.pp

@@ -1,49 +1,49 @@
 { Source provided for Free Pascal Bug Report 4519 }
 { Submitted by "Martin Schreiber" on  2005-11-17 }
 { e-mail:  }
-program project1;
-{$mode objfpc}{$h+}
-uses
- classes;
- 
-type
- ttestcomp = class(tcomponent)
-  private
-   fstringvar: string;
-   procedure readstringvar(reader: treader);
-   procedure writestringvar(writer: twriter);
-  protected
-   procedure defineproperties(filer: tfiler); override;
- end;
- 
-{ ttestcomp }
-
-procedure ttestcomp.readstringvar(reader: treader);
-begin
- fstringvar:= reader.readstring;
-end;
-
-procedure ttestcomp.writestringvar(writer: twriter);
-begin
- writer.writestring(fstringvar);
-end;
-
-procedure ttestcomp.defineproperties(filer: tfiler);
-begin
- filer.defineproperty('stringvar',@readstringvar,@writestringvar,true);
-end;
-
-var
- testcomp: ttestcomp;
- stream1,stream2: tmemorystream;
- 
-begin
- testcomp:= ttestcomp.create(nil);
- stream1:= tmemorystream.create;
- stream1.writecomponent(testcomp);
- stream1.position:= 0;
- stream2:= tmemorystream.create;
- objectbinarytotext(stream1,stream2); //<- AV
- stream1.free;
- stream2.free;
-end.
+program project1;
+{$mode objfpc}{$h+}
+uses
+ classes;
+
+type
+ ttestcomp = class(tcomponent)
+  private
+   fstringvar: string;
+   procedure readstringvar(reader: treader);
+   procedure writestringvar(writer: twriter);
+  protected
+   procedure defineproperties(filer: tfiler); override;
+ end;
+
+{ ttestcomp }
+
+procedure ttestcomp.readstringvar(reader: treader);
+begin
+ fstringvar:= reader.readstring;
+end;
+
+procedure ttestcomp.writestringvar(writer: twriter);
+begin
+ writer.writestring(fstringvar);
+end;
+
+procedure ttestcomp.defineproperties(filer: tfiler);
+begin
+ filer.defineproperty('stringvar',@readstringvar,@writestringvar,true);
+end;
+
+var
+ testcomp: ttestcomp;
+ stream1,stream2: tmemorystream;
+
+begin
+ testcomp:= ttestcomp.create(nil);
+ stream1:= tmemorystream.create;
+ stream1.writecomponent(testcomp);
+ stream1.position:= 0;
+ stream2:= tmemorystream.create;
+ objectbinarytotext(stream1,stream2); //<- AV
+ stream1.free;
+ stream2.free;
+end.

+ 15 - 15
tests/webtbs/tw4520.pp

@@ -1,18 +1,18 @@
 { Source provided for Free Pascal Bug Report 4520 }
 { Submitted by "Martin Schreiber" on  2005-11-17 }
 { e-mail:  }
-program project1;
- { $mode objfpc}{$h+}
-uses
- sysutils;
-var
- rea1,rea2: real;
- str1: string;
-begin
- rea1:= 1e100;
- str1:= floattostr(rea1);
- if str1<>'1E100' then
-   halt(1);
- writeln('1: ',rea1);
- writeln('2: ',str1);
-end.
+program project1;
+ { $mode objfpc}{$h+}
+uses
+ sysutils;
+var
+ rea1,rea2: real;
+ str1: string;
+begin
+ rea1:= 1e100;
+ str1:= floattostr(rea1);
+ if str1<>'1E100' then
+   halt(1);
+ writeln('1: ',rea1);
+ writeln('2: ',str1);
+end.

+ 17 - 17
tests/webtbs/tw4529.pp

@@ -1,20 +1,20 @@
 { Source provided for Free Pascal Bug Report 4529 }
 { Submitted by "Vincent Snijders" on  2005-11-20 }
 { e-mail: [email protected] }
-program Project1;
-
-{$mode objfpc}{$H+}{$static on}
-
-uses
-  Classes
-  { add your units here };
-
-type
-  MyClass = class(TComponent)
-  //private
-  public
-    FClassVar: integer; static;
-  end;
-
-begin
-end.
+program Project1;
+
+{$mode objfpc}{$H+}{$static on}
+
+uses
+  Classes
+  { add your units here };
+
+type
+  MyClass = class(TComponent)
+  //private
+  public
+    FClassVar: integer; static;
+  end;
+
+begin
+end.

+ 20 - 20
tests/webtbs/tw4540.pp

@@ -1,23 +1,23 @@
 { Source provided for Free Pascal Bug Report 4540 }
 { Submitted by "Aleksa Todorovic" on  2005-11-23 }
 { e-mail: [email protected] }
-program TestAnsiEndsStr;
-
-uses
-  StrUtils;
-
-begin
-  Writeln('A/AB: ', AnsiEndsStr('A', 'AB'));
-  if AnsiEndsStr('A', 'AB')<>false then
-    halt(1);
-    // False -> ok
-  Writeln('AB/AB: ', AnsiEndsStr('AB', 'AB'));
-  if AnsiEndsStr('AB', 'AB')<>true then
-    halt(1);
-    // True -> ok
-  Writeln('ABC/AB: ', AnsiEndsStr('ABC', 'AB'));
-  if AnsiEndsStr('ABC', 'AB')<>false then
-    halt(1);
-  writeln('ok');
-    // True -> ???
-end.
+program TestAnsiEndsStr;
+
+uses
+  StrUtils;
+
+begin
+  Writeln('A/AB: ', AnsiEndsStr('A', 'AB'));
+  if AnsiEndsStr('A', 'AB')<>false then
+    halt(1);
+    // False -> ok
+  Writeln('AB/AB: ', AnsiEndsStr('AB', 'AB'));
+  if AnsiEndsStr('AB', 'AB')<>true then
+    halt(1);
+    // True -> ok
+  Writeln('ABC/AB: ', AnsiEndsStr('ABC', 'AB'));
+  if AnsiEndsStr('ABC', 'AB')<>false then
+    halt(1);
+  writeln('ok');
+    // True -> ???
+end.

+ 11 - 12
tests/webtbs/tw4566.pp

@@ -1,15 +1,14 @@
 { Source provided for Free Pascal Bug Report 4566 }
 { Submitted by "Vincent Snijders" on  2005-12-04 }
 { e-mail: [email protected] }
-program bug4566;
-
-{$mode objfpc}{$H+}
-
-var
-  s: string;
-  
-begin
-  //accidently use #1310 instead of #13#10
-  s := 'Message Text' + #1310 + #1310 + 'More Text';
-end.
-                   
+program bug4566;
+
+{$mode objfpc}{$H+}
+
+var
+  s: string;
+
+begin
+  //accidently use #1310 instead of #13#10
+  s := 'Message Text' + #1310 + #1310 + 'More Text';
+end.

+ 13 - 13
tests/webtbs/tw4624.pp

@@ -1,16 +1,16 @@
 { Source provided for Free Pascal Bug Report 4624 }
 { Submitted by "benoit sanchez" on  2005-12-20 }
 { e-mail: [email protected] }
-type Number=record
-  value:boolean;
-end;
-
-operator div (a,b:number) c:number;
-begin
-  c.value:=true;
-end;
-
-var a:number;
-begin
-  a:=a div a;
-end.
+type Number=record
+  value:boolean;
+end;
+
+operator div (a,b:number) c:number;
+begin
+  c.value:=true;
+end;
+
+var a:number;
+begin
+  a:=a div a;
+end.

+ 86 - 86
tests/webtbs/tw4634.pp

@@ -1,89 +1,89 @@
 { Source provided for Free Pascal Bug Report 4634 }
 { Submitted by "Graeme Geldenhuys" on  2005-12-23 }
 { e-mail: [email protected] }
-program Project1;
-{$ifdef fpc}
-{$mode objfpc}
-{$endif fpc}
-{$H+}
-uses
-  Classes, SysUtils, Variants;
-
-function IsVariantOfType( pVariant : Variant ; pVarType : TVarType ) : boolean ;
-var
-  xVT : TVarType;
-  xVTHigh : TVarType;
-begin
-//  result := ( varType( pVariant ) and pVarType ) = pVarType ;
-// Contr: VarType is varDate = 0007, pVarType is varInteger=0003.
-// 0007 and 0003 = 0003. WRONG!
-
-  xVT := VarType(pVariant);
-  xVTHigh := xVT and (not varTypeMask);
-
-{  in true pVarType can be and OR of two types: varArray and varString (or others)
-   we have to recognize it.
-   there shouldn't be xVTLow because when we have array of string (normal) then
-   xVT=$2008 = $2000 (var Array) or $0008 (var String)
-   then when we asked:
-     is $2000 (varArray)? we should receive TRUE (xVTHigh=pVarType)
-     is $2008 (varArray of varString)? we should receive TRUE (xVT=pVarType)
-     is $0008 (varString)? we should receive FALSE
-}
-  Result := (xVT=pVarType) or ((xVTHigh=pVarType) and (xVTHigh<>varEmpty));
-end ;
-
-procedure TestIsVariantOfType ;
-
-  procedure _tiIsVariantOfType(xVar : variant; xExpected : TVarType; xMsg : string);
-
-    procedure __tiIsVariantOfType(xxCheck : TVarType; xxMsg : string);
-    begin
-      if xxCheck=xExpected then
-      begin
-        If not IsVariantOfType( xVar, xxCheck ) then
-          Writeln(xMsg);
-      end
-      else
-      begin
-        If IsVariantOfType( xVar, xxCheck ) then
-          Writeln(xMsg + ' - ' + xxMsg);
-      end;
-    end;
-
-  begin
-    __tiIsVariantOfType(varEmpty,'varEmpty');
-    __tiIsVariantOfType(varNull,'varNull');
-    __tiIsVariantOfType(varSmallint,'varSmallInt');
-    __tiIsVariantOfType(varInteger,'varInteger');
-    __tiIsVariantOfType(varSingle,'varSingle');
-    __tiIsVariantOfType(varDouble,'varDouble');
-    __tiIsVariantOfType(varDate,'varDate');
-    __tiIsVariantOfType(varBoolean,'varBoolean');
-    __tiIsVariantOfType(varOleStr,'varOleStr');
-  end;
-var
-  lVar : Variant ;
-  lSmallInt : Smallint;
-  lInteger : Integer;
-  lDouble : Double;
-  lDateTimeNow : TDateTime;
-  lDateTimeDate : TDateTime;
-  lOleString : WideString;
-  lString : string;
-  lBoolean : boolean;
-  lCurrency : Currency;
-begin
-  lDouble := 123.45678901234567890;
-
-// Can't make this one work
-  lVar:=VarAsType(123.456,varSingle);
-  _tiIsVariantOfType(lVar,varSingle,'Failed with VarSingle');
-
-  lVar:=lDouble;
-  _tiIsVariantOfType(lVar,varDouble,'Failed with VarDouble');
-end;
-
-begin
-  TestIsVariantOfType;
-end.
+program Project1;
+{$ifdef fpc}
+{$mode objfpc}
+{$endif fpc}
+{$H+}
+uses
+  Classes, SysUtils, Variants;
+
+function IsVariantOfType( pVariant : Variant ; pVarType : TVarType ) : boolean ;
+var
+  xVT : TVarType;
+  xVTHigh : TVarType;
+begin
+//  result := ( varType( pVariant ) and pVarType ) = pVarType ;
+// Contr: VarType is varDate = 0007, pVarType is varInteger=0003.
+// 0007 and 0003 = 0003. WRONG!
+
+  xVT := VarType(pVariant);
+  xVTHigh := xVT and (not varTypeMask);
+
+{  in true pVarType can be and OR of two types: varArray and varString (or others)
+   we have to recognize it.
+   there shouldn't be xVTLow because when we have array of string (normal) then
+   xVT=$2008 = $2000 (var Array) or $0008 (var String)
+   then when we asked:
+     is $2000 (varArray)? we should receive TRUE (xVTHigh=pVarType)
+     is $2008 (varArray of varString)? we should receive TRUE (xVT=pVarType)
+     is $0008 (varString)? we should receive FALSE
+}
+  Result := (xVT=pVarType) or ((xVTHigh=pVarType) and (xVTHigh<>varEmpty));
+end ;
+
+procedure TestIsVariantOfType ;
+
+  procedure _tiIsVariantOfType(xVar : variant; xExpected : TVarType; xMsg : string);
+
+    procedure __tiIsVariantOfType(xxCheck : TVarType; xxMsg : string);
+    begin
+      if xxCheck=xExpected then
+      begin
+        If not IsVariantOfType( xVar, xxCheck ) then
+          Writeln(xMsg);
+      end
+      else
+      begin
+        If IsVariantOfType( xVar, xxCheck ) then
+          Writeln(xMsg + ' - ' + xxMsg);
+      end;
+    end;
+
+  begin
+    __tiIsVariantOfType(varEmpty,'varEmpty');
+    __tiIsVariantOfType(varNull,'varNull');
+    __tiIsVariantOfType(varSmallint,'varSmallInt');
+    __tiIsVariantOfType(varInteger,'varInteger');
+    __tiIsVariantOfType(varSingle,'varSingle');
+    __tiIsVariantOfType(varDouble,'varDouble');
+    __tiIsVariantOfType(varDate,'varDate');
+    __tiIsVariantOfType(varBoolean,'varBoolean');
+    __tiIsVariantOfType(varOleStr,'varOleStr');
+  end;
+var
+  lVar : Variant ;
+  lSmallInt : Smallint;
+  lInteger : Integer;
+  lDouble : Double;
+  lDateTimeNow : TDateTime;
+  lDateTimeDate : TDateTime;
+  lOleString : WideString;
+  lString : string;
+  lBoolean : boolean;
+  lCurrency : Currency;
+begin
+  lDouble := 123.45678901234567890;
+
+// Can't make this one work
+  lVar:=VarAsType(123.456,varSingle);
+  _tiIsVariantOfType(lVar,varSingle,'Failed with VarSingle');
+
+  lVar:=lDouble;
+  _tiIsVariantOfType(lVar,varDouble,'Failed with VarDouble');
+end;
+
+begin
+  TestIsVariantOfType;
+end.