Browse Source

* new tests for wrong Notes

peter 25 years ago
parent
commit
dd4c5959f3
2 changed files with 19 additions and 0 deletions
  1. 8 0
      tests/tbs/tbs0317.pp
  2. 11 0
      tests/tbs/tbs0318.pp

+ 8 - 0
tests/tbs/tbs0317.pp

@@ -0,0 +1,8 @@
+{ $OPT= -Sen }
+
+{ This shouldn't give a warning, because it can be used in an other program }
+var
+  exportedc : longint;cvar;public;
+begin
+  exportedc:=0;
+end.

+ 11 - 0
tests/tbs/tbs0318.pp

@@ -0,0 +1,11 @@
+{ $OPT=-Sen }
+{$mode objfpc}
+uses sysutils;
+
+{ The exception is used in the raise statement, so no Note should be thrown }
+var
+  e  : exception;
+begin
+  e:=exception.create('test');
+  raise e;
+end.