Browse Source

* objpas.integer=smallint fixes in several tests

git-svn-id: trunk@27054 -
nickysn 11 years ago
parent
commit
0621dd523a

+ 1 - 1
tests/webtbs/tw10320.pp

@@ -14,7 +14,7 @@ type
     function GetP(Index : integer) : Pointer;
     constructor create;
   public
-    property P[Index: LongInt]: Pointer read GetP;
+    property P[Index: Integer]: Pointer read GetP;
   end;
   
 var a : TRgbArray;

+ 1 - 1
tests/webtbs/tw15415.pp

@@ -2,7 +2,7 @@
 
 type
  TMyClass = class
-   i, i2 :Integer;
+   i, i2 :LongInt;
  end;
 
 begin

+ 5 - 5
tests/webtbs/tw16365.pp

@@ -11,8 +11,8 @@ type
  
  timpclass = class(tobject,itest)
   protected
-   function _addref: integer; virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
-   function _release: integer; virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+   function _addref: longint; virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+   function _release: longint; virtual; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    function QueryInterface(constref IID: TGUID; out Obj): HResult; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
   public
    function test: longint;
@@ -35,12 +35,12 @@ begin
  result:=123456;
 end;
 
-function timpclass._addref: integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+function timpclass._addref: longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
 begin
  result:= -1;
 end;
 
-function timpclass._release: integer;  {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+function timpclass._release: longint;  {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
 begin
  result:= -1;
 end;
@@ -51,7 +51,7 @@ begin
    Result:=0
  end
  else begin
-  result:= integer(e_nointerface);
+  result:= HResult(e_nointerface);
  end;
 end;
 

+ 2 - 2
tests/webtbs/tw20192.pp

@@ -8,7 +8,7 @@ type
     public
       constructor Create(Val: _T);
 
-      function Bug: Integer;
+      function Bug: LongInt;
   end;
 
 {--- TGen.Create ---}
@@ -19,7 +19,7 @@ begin
 end;
 
 {--- TGen.Bug ---}
-function TGen.Bug : Integer;
+function TGen.Bug : LongInt;
 begin
   Result := 100000 div SizeOf(_T);  // *** DIVISION BY ZERO ***
 

+ 6 - 6
tests/webtbs/tw2177.pp

@@ -16,25 +16,25 @@ type
 
   Twii= class(TObject, ii)
     s: string;
-    function QueryInterface(constref IID: TGUID; out Obj): Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
-    function _AddRef: Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
-    function _Release: Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+    function QueryInterface(constref IID: TGUID; out Obj): Longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+    function _AddRef: Longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+    function _Release: Longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
 
     procedure Show;stdcall;
   end;
 
   {________doomy interfaces______}
-  function Twii.QueryInterface(constref IID: TGUID; out Obj): Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+  function Twii.QueryInterface(constref IID: TGUID; out Obj): Longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
   begin
     result:= -1;
   end;
 
-  function Twii._AddRef: Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+  function Twii._AddRef: Longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
   begin
     result:= -1;
   end;
 
-  function Twii._Release: Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+  function Twii._Release: Longint; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
   begin
     result:= -1;
   end;

+ 1 - 1
tests/webtbs/tw4778.pp

@@ -6,7 +6,7 @@ program Test1;
 {$mode delphi}
 
 var
-  AnInt : Integer;
+  AnInt : Longint;
   
 begin
 

+ 1 - 1
tests/webtbs/tw8140h.pp

@@ -17,7 +17,7 @@ type
  locateoptionsty  = set of locateoptionty;
 
  imselocate = interface(inullinterface)['{2680958F-F954-DA11-9015-00C0CA1308FF}']
-   function locate(const key: integer; const field: tfield;
+   function locate(const key: longint; const field: tfield;
                      const options: locateoptionsty = []): locateresultty;
  end;