Переглянути джерело

* new tests for wrong Notes

peter 25 роки тому
батько
коміт
dd4c5959f3
2 змінених файлів з 19 додано та 0 видалено
  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.