Browse Source

Add tests for Mantis 18103 which somehow is completely fixed now (not related
to my last commit though...).

git-svn-id: trunk@20248 -

svenbarth 13 years ago
parent
commit
6204da6248
4 changed files with 112 additions and 0 deletions
  1. 3 0
      .gitattributes
  2. 37 0
      tests/webtbs/tw18103a.pp
  3. 37 0
      tests/webtbs/tw18103b.pp
  4. 35 0
      tests/webtbs/tw18103c.pp

+ 3 - 0
.gitattributes

@@ -12048,6 +12048,9 @@ tests/webtbs/tw18075.pp svneol=native#text/pascal
 tests/webtbs/tw18082.pp svneol=native#text/plain
 tests/webtbs/tw18082.pp svneol=native#text/plain
 tests/webtbs/tw18085.pp svneol=native#text/pascal
 tests/webtbs/tw18085.pp svneol=native#text/pascal
 tests/webtbs/tw18086.pp svneol=native#text/pascal
 tests/webtbs/tw18086.pp svneol=native#text/pascal
+tests/webtbs/tw18103a.pp svneol=native#text/pascal
+tests/webtbs/tw18103b.pp svneol=native#text/pascal
+tests/webtbs/tw18103c.pp svneol=native#text/pascal
 tests/webtbs/tw18113.pp svneol=native#text/plain
 tests/webtbs/tw18113.pp svneol=native#text/plain
 tests/webtbs/tw18123.pp svneol=native#text/pascal
 tests/webtbs/tw18123.pp svneol=native#text/pascal
 tests/webtbs/tw18127.pp svneol=native#text/pascal
 tests/webtbs/tw18127.pp svneol=native#text/pascal

+ 37 - 0
tests/webtbs/tw18103a.pp

@@ -0,0 +1,37 @@
+program gentest;
+
+// alias test generic class
+// example is a subset of a working delphi class
+// the nested types are there so that they can be used to defined types (e.g.  var p : bwimagespecialization.reft;)
+//
+
+{$mode objfpc}
+
+
+{.define fpchere}
+
+Type
+  generic tbwimagegen<T> = Class(TObject)
+                 Type
+                    TLocalType = specialize tbwimagegen<T>;
+                    BaseUnit = T;
+                    RefT= ^BaseUnit;
+                  procedure copylines(source:  specialize tbwimagegen<T>;xfrom,xto:integer;xdestline:integer=0);
+                  function GetImagePointer( OriginX, OriginY : Integer ): reft;inline;
+                  function GetLinePointer(originy:integer):reft;
+                  property scanline[i:integer]:reft read getlinepointer;
+                  end;
+
+
+procedure tbwimagegen.copylines(source: specialize tbwimagegen<T>;xfrom,xto:integer;xdestline:integer=0);
+begin
+end;
+function tbwimagegen.GetImagePointer( OriginX, OriginY : Integer ): reft;inline;
+begin
+end;
+function tbwimagegen.GetLinePointer(originy:integer):reft;
+begin
+end;
+
+begin
+end.

+ 37 - 0
tests/webtbs/tw18103b.pp

@@ -0,0 +1,37 @@
+program gentest;
+
+// alias test generic class
+// example is a subset of a working delphi class
+// the nested types are there so that they can be used to defined types (e.g.  var p : bwimagespecialization.reft;)
+//
+
+{$mode objfpc}
+
+
+{.define fpchere}
+
+Type
+  generic tbwimagegen<T> = Class(TObject)
+                 Type
+                    TLocalType = tbwimagegen;
+                    BaseUnit = T;
+                    RefT= ^BaseUnit;
+                  procedure copylines(source:  tbwimagegen;xfrom,xto:integer;xdestline:integer=0);
+                  function GetImagePointer( OriginX, OriginY : Integer ): reft;inline;
+                  function GetLinePointer(originy:integer):reft;
+                  property scanline[i:integer]:reft read getlinepointer;
+                  end;
+
+
+procedure tbwimagegen.copylines(source: tbwimagegen;xfrom,xto:integer;xdestline:integer=0);
+begin
+end;
+function tbwimagegen.GetImagePointer( OriginX, OriginY : Integer ): reft;inline;
+begin
+end;
+function tbwimagegen.GetLinePointer(originy:integer):reft;
+begin
+end;
+
+begin
+end.

+ 35 - 0
tests/webtbs/tw18103c.pp

@@ -0,0 +1,35 @@
+program gentest;
+
+// alias test generic class
+// example is a subset of a working delphi class
+// the nested types are there so that they can be used to defined types (e.g.  var p : bwimagespecialization.reft;)
+//
+
+{$mode delphi}
+
+
+Type
+  tbwimagegen<T> = Class(TObject)
+                 Type
+                    TLocalType = tbwimagegen<T>;
+                    BaseUnit = T;
+                    RefT= ^BaseUnit;
+                  procedure copylines(source: tbwimagegen<T>;xfrom,xto:integer;xdestline:integer=0);
+                  function GetImagePointer( OriginX, OriginY : Integer ): reft;inline;
+                  function GetLinePointer(originy:integer):reft;
+                  property scanline[i:integer]:reft read getlinepointer;
+                  end;
+
+
+procedure tbwimagegen<T>.copylines(source: tbwimagegen<T>;xfrom,xto:integer;xdestline:integer=0);
+begin
+end;
+function tbwimagegen<T>.GetImagePointer( OriginX, OriginY : Integer ): reft;inline;
+begin
+end;
+function tbwimagegen<T>.GetLinePointer(originy:integer):reft;
+begin
+end;
+
+begin
+end.