Przeglądaj źródła

tests: add more tests for sealed/abstract classes

git-svn-id: branches/paul/features@13893 -
paul 16 lat temu
rodzic
commit
745a8e940e
3 zmienionych plików z 29 dodań i 0 usunięć
  1. 2 0
      .gitattributes
  2. 12 0
      tests/test/tsealed3.pp
  3. 15 0
      tests/test/tsealed4.pp

+ 2 - 0
.gitattributes

@@ -8399,6 +8399,8 @@ tests/test/trtti4.pp svneol=native#text/plain
 tests/test/trtti5.pp svneol=native#text/plain
 tests/test/tsealed1.pp svneol=native#text/pascal
 tests/test/tsealed2.pp svneol=native#text/pascal
+tests/test/tsealed3.pp svneol=native#text/pascal
+tests/test/tsealed4.pp svneol=native#text/pascal
 tests/test/tsel1.pp svneol=native#text/plain
 tests/test/tsel2.pp svneol=native#text/plain
 tests/test/tset1.pp svneol=native#text/plain

+ 12 - 0
tests/test/tsealed3.pp

@@ -0,0 +1,12 @@
+{ %fail }
+{$ifdef fpc}
+{$mode objfpc}
+{$endif}
+
+type
+  TSealedClass = class abstract sealed
+  public
+  end;
+begin
+end.
+

+ 15 - 0
tests/test/tsealed4.pp

@@ -0,0 +1,15 @@
+{$ifdef fpc}
+{$mode objfpc}
+{$endif}
+
+type
+  TAbstractClass = class abstract abstract abstract
+  public
+  end;
+
+  TSealedClass = class sealed sealed sealed
+  public
+  end;
+begin
+end.
+