Browse Source

* more fun testing :)

carl 23 years ago
parent
commit
4ff94d240d
7 changed files with 93 additions and 0 deletions
  1. 6 0
      tests/tbf/tb0131.pp
  2. 6 0
      tests/tbf/tb0132.pp
  3. 5 0
      tests/tbf/tb0133.pp
  4. 19 0
      tests/tbf/tb0134.pp
  5. 19 0
      tests/tbf/tb0135.pp
  6. 19 0
      tests/tbf/tb0136.pp
  7. 19 0
      tests/tbf/tb0137.pp

+ 6 - 0
tests/tbf/tb0131.pp

@@ -0,0 +1,6 @@
+{ %FAIL }
+{ This should normally fail compilation!}
+Begin
+{$ifndef}
+{$endif}
+end.

+ 6 - 0
tests/tbf/tb0132.pp

@@ -0,0 +1,6 @@
+{ %FAIL }
+{ This should normally fail compilation!}
+Begin
+{$ifopt}
+{$endif}
+end.

+ 5 - 0
tests/tbf/tb0133.pp

@@ -0,0 +1,5 @@
+{ %FAIL }
+{ This should normally fail compilation!}
+Begin
+{$ASSERTIONS}
+end.

+ 19 - 0
tests/tbf/tb0134.pp

@@ -0,0 +1,19 @@
+{ %FAIL }
+{ This shouldc not compile, cdecl'ed constructor are not allowed }
+
+{$mode objfpc}
+
+type
+  tmyclass = class
+    constructor create; cdecl;
+  end;
+  
+  
+  constructor tmyclass.create;cdecl;
+  begin
+  end;
+  
+
+Begin
+end.
+  

+ 19 - 0
tests/tbf/tb0135.pp

@@ -0,0 +1,19 @@
+{ %FAIL }
+{ This shouldc not compile, cdecl'ed constructor are not allowed }
+
+{$mode objfpc}
+
+type
+  tmyobject = object
+    constructor create; cdecl;
+  end;
+  
+  
+  constructor tmyobject.create;cdecl;
+  begin
+  end;
+  
+
+Begin
+end.
+  

+ 19 - 0
tests/tbf/tb0136.pp

@@ -0,0 +1,19 @@
+{ %FAIL }
+{ This shouldc not compile, cdecl'ed constructor are not allowed }
+
+{$mode objfpc}
+
+type
+  tmyclass = class
+    destructor destroy; cdecl;
+  end;
+  
+  
+  destructor tmyclass.destroy;cdecl;
+  begin
+  end;
+  
+
+Begin
+end.
+  

+ 19 - 0
tests/tbf/tb0137.pp

@@ -0,0 +1,19 @@
+{ %FAIL }
+{ This shouldc not compile, cdecl'ed constructor are not allowed }
+
+{$mode objfpc}
+
+type
+  tmyclass = object
+    destructor done; cdecl;
+  end;
+  
+  
+  destructor tmyclass.done;cdecl;
+  begin
+  end;
+  
+
+Begin
+end.
+